Game

Core class that manages input, scenes, and the window

Constructors

this
this(string title, int width, int height)

Sets up the window

Members

Functions

quit
void quit()

Stops the game loop after it finishes a final cycle

setResizable
void setResizable(bool resizable)

Allows/Prevents window resizing

setTitle
void setTitle(string title)
start
void start(Scene scene)

Starts the game loop and sets the initial scene

swapScene
void swapScene(Scene scene)

Changes the active scene

toggleFullscreen
void toggleFullscreen()

Fullscreen windowed

Properties

activeScene
Scene activeScene [@property getter]
input
Input input [@property getter]
isFullscreen
bool isFullscreen [@property getter]
screen
Screen screen [@property getter]

Variables

targetFPS
int targetFPS;

The FPS the gameloop will attempt to maintain

Meta