Class TGameLoop

Unit

Declaration

type TGameLoop = class(TObject)

Description

Caller owns Game and supplies measured elapsed time. No OS clock or VCL. Game must outlive this loop; destroying the loop does not free Game.

Source: src/Breakout.Loop.pas (line 19).

Hierarchy

Overview

Methods

Public constructor Create(Game: TGame);
Public procedure ResetClock;
Public procedure Execute(Command: TGameCommand);
Public procedure Advance(ElapsedSeconds: Double);

Properties

Public property Diagnostics: TLoopDiagnostics read FDiagnostics;

Description

Methods

Public constructor Create(Game: TGame);

This item has no description.

Source: src/Breakout.Loop.pas (line 24).

Public procedure ResetClock;

Drops pending fractional time, e.g. across pause/resume.

Source: src/Breakout.Loop.pas (line 26).

Public procedure Execute(Command: TGameCommand);

Forwards intent and resets pending time on lifecycle transitions.

Source: src/Breakout.Loop.pas (line 28).

Public procedure Advance(ElapsedSeconds: Double);

Accumulates measured time and executes complete 1/120 s quanta. Time above MaxElapsedSeconds and excess complete steps are recorded as discarded; a fractional remainder survives for the next callback. Raises EArgumentOutOfRangeException on invalid elapsed time.

Parameters
ElapsedSeconds
Finite, nonnegative real elapsed seconds.

Source: src/Breakout.Loop.pas (line 34).

Properties

Public property Diagnostics: TLoopDiagnostics read FDiagnostics;

This item has no description.

Source: src/Breakout.Loop.pas (line 35).


Generated by PasDoc 1.0.4.