C# Class Sharpex2D.GameLoop

Inheritance: IComponent
ファイルを表示 Open project: ThuCommix/Sharpex2D Class Usage Examples

Public Methods

Method Description
GameLoop ( ) : System

Initializes a new GameLoop class.

Start ( ) : void

Starts the game loop.

Stop ( ) : void

Stops the game loop.

Subscribe ( IDrawable drawable ) : void

Subscribes a new IDrawable to the game loop.

Subscribe ( IUpdateable updateable ) : void

Subscribes a new IUpdateable to the game loop.

Unsubscribe ( IDrawable drawable ) : void

Unsubscribes a IDrawable from the game loop.

Unsubscribe ( IUpdateable updateable ) : void

Unsubscribes a IUpdateable from the game loop.

Private Methods

Method Description
Loop ( ) : void

The actual game loop.

RenderSubscribers ( ) : void

Renders the subscribers.

UpdateSubscribers ( ) : void

Updates the subscribers.

Method Details

GameLoop() public method

Initializes a new GameLoop class.
public GameLoop ( ) : System
return System

Start() public method

Starts the game loop.
public Start ( ) : void
return void

Stop() public method

Stops the game loop.
public Stop ( ) : void
return void

Subscribe() public method

Subscribes a new IDrawable to the game loop.
public Subscribe ( IDrawable drawable ) : void
drawable IDrawable The IDrawable.
return void

Subscribe() public method

Subscribes a new IUpdateable to the game loop.
public Subscribe ( IUpdateable updateable ) : void
updateable IUpdateable The IUpdateable.
return void

Unsubscribe() public method

Unsubscribes a IDrawable from the game loop.
public Unsubscribe ( IDrawable drawable ) : void
drawable IDrawable The IDrawable.
return void

Unsubscribe() public method

Unsubscribes a IUpdateable from the game loop.
public Unsubscribe ( IUpdateable updateable ) : void
updateable IUpdateable The IUpdateable.
return void