Method | Description | |
---|---|---|
FixedTimeStepSimulationLoop ( System.TimeSpan targetElapsedTime, System.TimeSpan maxElapsedTime ) : System |
After Start has been called, FixedTimeStepSimulationLoop will try to call the update function on the fixed interval specified by TargetElapsedTime. After this, if it is not time to call update again, the draw function is called. The game loop idles until the next time to call update.
|
|
SetDraw ( Action |
Sets the draw function that is called when the simulation needs to draw.
|
|
SetUpdate ( Action |
Sets the update function that is called when the simulation needs to update.
|
|
Start ( ) : void |
Starts the game loop.
|
|
Tick ( ) : void |
Calls update and draw when appropriate. This method should be called whenever the application does not have messages to process.
|
Method | Description | |
---|---|---|
GetElapsedTime ( ) : System.TimeSpan |
public FixedTimeStepSimulationLoop ( System.TimeSpan targetElapsedTime, System.TimeSpan maxElapsedTime ) : System | ||
targetElapsedTime | System.TimeSpan | The target time between calls to |
maxElapsedTime | System.TimeSpan | The maximum amount of time between calls to |
return | System |
public SetDraw ( Action |
||
step | Action |
The draw function. |
return | void |
public SetUpdate ( Action |
||
step | Action |
The update function. |
return | void |