C# Class Protogame.DefaultSensorEngine

The default implementation of an ISensorEngine.
Inheritance: ISensorEngine
Show file Open project: RedpointGames/Protogame

Public Methods

Method Description
DefaultSensorEngine ( ) : System

Initializes a new instance of DefaultSensorEngine.

Deregister ( ISensor sensor ) : void

Deregisters a hardware sensor from the sensor engine, ensuring that it is no longer updated as the game runs.

Register ( ISensor sensor ) : void

Registers a hardware sensor with the sensor engine, ensuring that it is updated as the game runs.

Render ( IGameContext gameContext, IRenderContext renderContext ) : void

Internally called by SensorEngineHook to update sensors during the render step.

Update ( IGameContext gameContext, IUpdateContext updateContext ) : void

Internally called by SensorEngineHook to update sensors during the update step.

Method Details

DefaultSensorEngine() public method

Initializes a new instance of DefaultSensorEngine.
public DefaultSensorEngine ( ) : System
return System

Deregister() public method

Deregisters a hardware sensor from the sensor engine, ensuring that it is no longer updated as the game runs.
public Deregister ( ISensor sensor ) : void
sensor ISensor The hardware sensor to deregister.
return void

Register() public method

Registers a hardware sensor with the sensor engine, ensuring that it is updated as the game runs.
public Register ( ISensor sensor ) : void
sensor ISensor The hardware sensor to register.
return void

Render() public method

Internally called by SensorEngineHook to update sensors during the render step.
public Render ( IGameContext gameContext, IRenderContext renderContext ) : void
gameContext IGameContext The current game context.
renderContext IRenderContext The current render context.
return void

Update() public method

Internally called by SensorEngineHook to update sensors during the update step.
public Update ( IGameContext gameContext, IUpdateContext updateContext ) : void
gameContext IGameContext The current game context.
updateContext IUpdateContext The current update context.
return void