Class Game
Derive this class for your game application.
Overview
Game Loop
Constructors
Name | Description |
this
(name, clearColor)
|
Instantiate a new Game.
|
Fields
Name | Type | Description |
clearColor
|
const(Color) | Default value for the color this Game's Windows' framebuffers should be cleared to when rendered.
|
mainWindow
|
Window | This Game's primary Window.
|
world
|
World | This Game's primary World.
|
Properties
Name | Type | Description |
active [get]
|
bool | Whether the Game is active, i.e. is open and running.
|
desiredFrameRateHertz [get]
|
int | Target frame rate of the Game, in hertz.
|
frameRateLimited [get]
|
bool | Whether the Game's framerate is being limited.
|
name [get]
|
string | Name of the Game.
|
Methods
Name | Description |
add
(system)
|
Add a System that operates on resources and Components in the game's World .
|
add
(system)
|
Add a System, dynamically generated from a function, that operates on resources and Components in the game's World .
|
run
()
|
Run the game.
|
simpleSubmission
(window, cmdBufs)
|
Build a graphics pipeline submission for the simplest cases with a single submission.
|
exit
()
|
Stop the game loop and exit the Game.
|
initializeWorld
(world)
|
Called when the Game should initialize its World .
|