C# Class Protogame.EventEngineHook

A game engine hook that raised appropriate input events as they occur.
Inheritance: IEngineHook
ファイルを表示 Open project: RedpointGames/Protogame

Public Methods

Method Description
EventEngineHook ( IEventEngine eventEngine ) : System

Initializes a new instance of the EventEngineHook class.

Render ( IGameContext gameContext, IRenderContext renderContext ) : void

The render callback for the engine hook. This is triggered right before the rendering of the world manager.

Update ( IGameContext gameContext, IUpdateContext updateContext ) : void

The update callback for the engine hook. This is triggered right before the update of the world manager.

For this engine hook, this updates and fires input events as appropriate.

Update ( IServerContext serverContext, IUpdateContext updateContext ) : void

Private Methods

Method Description
UpdateGamepad ( IGameContext gameContext ) : void

Iterates through all of the connected game pads, updates their state and fires input events.

UpdateGamepadSingle ( IGameContext gameContext, int index, GamePadState gamepadState ) : void

Updates and fires input events for a single game pad. This method is used by UpdateGamepad.

UpdateKeyboard ( IGameContext gameContext ) : void

Updates and fires input events for the keyboard.

UpdateMouse ( IGameContext gameContext ) : void

Updates and fires input events for the mouse.

UpdateTouch ( IGameContext gameContext ) : void

Updates and fires input events for a touch device.

Method Details

EventEngineHook() public method

Initializes a new instance of the EventEngineHook class.
public EventEngineHook ( IEventEngine eventEngine ) : System
eventEngine IEventEngine /// The event engine to raise events on. ///
return System

Render() public method

The render callback for the engine hook. This is triggered right before the rendering of the world manager.
public Render ( IGameContext gameContext, IRenderContext renderContext ) : void
gameContext IGameContext /// The game context. ///
renderContext IRenderContext /// The render context. ///
return void

Update() public method

The update callback for the engine hook. This is triggered right before the update of the world manager.

For this engine hook, this updates and fires input events as appropriate.

public Update ( IGameContext gameContext, IUpdateContext updateContext ) : void
gameContext IGameContext /// The game context. ///
updateContext IUpdateContext /// The update context. ///
return void

Update() public method

public Update ( IServerContext serverContext, IUpdateContext updateContext ) : void
serverContext IServerContext
updateContext IUpdateContext
return void