Skip to content

GameTime(TimeSpan, TimeSpan, long, bool, float) Constructor

Definition

Namespace: Brine2D.Core

Represents timing information for the game loop.

C#
public GameTime(System.TimeSpan TotalTime, System.TimeSpan ElapsedTime, long FrameCount=0L, bool IsTimeClamped=false, float Alpha=0f);

Parameters

TotalTime System.TimeSpan

The total elapsed time since the game started.

ElapsedTime System.TimeSpan

The elapsed time since the last frame.

FrameCount System.Int64

The total number of frames rendered since the game started.

IsTimeClamped System.Boolean

Whether ElapsedTime was clamped this frame. True when the raw delta exceeded MaxDeltaTime \(e\.g\., after a debugger pause\). Systems that synchronize with wall-clock time \(audio, animation\) can use this to skip resynchronization rather than jumping forward.

Alpha System.Single

Physics interpolation factor in the range [0, 1]. Only meaningful during the render pass. Represents how far the current frame is between the last two fixed timesteps: 0 = exactly at the last fixed step, 1 = exactly at the next step. Use this to lerp rendered positions between the previous and current physics state for smooth visuals at any frame rate. Always 0 during Update and FixedUpdate.