C# Class Duality.Time

The Time class provides a global interface for time measurement and control. It affects all time-dependent computations. Use the TimeMult Property to make your own computations time-dependent instead of frame-dependent. Otherwise, your game logic will depend on how many FPS the player's machine achieves and mit behave differently on very slow or fast machines.
Mostra file Open project: BraveSirAndrew/duality Class Usage Examples

Public Methods

Method Description
Freeze ( ) : void

Freezes game time. This will cause the GameTimer to stop and TimeMult to equal zero.

Resume ( ) : void

Unfreezes game time. TimeMult resumes to its normal value and GameTimer starts running again.

Private Methods

Method Description
FrameTick ( bool forceFixedStep = false ) : void
Resume ( bool hardReset ) : void

Method Details

Freeze() public static method

Freezes game time. This will cause the GameTimer to stop and TimeMult to equal zero.
public static Freeze ( ) : void
return void

Resume() public static method

Unfreezes game time. TimeMult resumes to its normal value and GameTimer starts running again.
public static Resume ( ) : void
return void