GameTimer
Declaration
public class Strawberry.GameTimer
The default implementation for IFrameInfoProvider
Implements: Strawberry.IFrameInfoProvider
Properties
ElapsedTime
Gets the total time elapsed since the start of the game in milliseconds.
TimeSpan ElapsedTime { get }
GameSpeed
Gets or sets the number of game fixed updates per second.
int GameSpeed { get set }
FPS
Gets the number of Frames Per Second
int FPS { get }
RealGameSpeed
Gets the real number of game updates per second.
int RealGameSpeed { get }
MinFPS
Gets the minimum number of Frames Per Second during game.
int MinFPS { get }
MaxFPS
Gets the maximum number of Frames Per Second during game.
int MaxFPS { get }
LastTime
Gets the last time in which game scene has been rendered.
float LastTime { get }
DeltaTime
Gets the fraction of seconds by which the scene is rendered. You can use this in your Update or Render events to fix your movements, animations, etc. to real seconds.
float DeltaTime { get }
FixedDeltaTime
Gets the fraction of seconds by which the scene is rendered. This is completely bound to GameSpeed. You can use this in your FixedUpdate events to fix your movements, animations, etc. to real seconds.
float FixedDeltaTime { get }
ShouldFixedUpdate
bool ShouldFixedUpdate { get }
Methods
Initialize
void Initialize()
BeginUpdate
void BeginUpdate()
FixedUpdate
void FixedUpdate()
EndUpdate
void EndUpdate()