Game

Game

Constructors

this
this(WindowSettings settings, GLContextSettings contextSettings)

Game constructor.

Members

Functions

addEvent
void addEvent(OnEvent event)

Adds event that will be processed by the main thread.

addScheduledTask
void addScheduledTask(float time, OnEvent task)

Adds scheduled event that will be processed by the main thread.

dispose
void dispose()

Game destructor.

fixedUpdate
void fixedUpdate()

Processes game logic at fixed time rate, defined by m_tickrate.

onKey
void onKey(GLFWwindow* window, int key, int scancode, int action, int mods)

Event called on key action.

onMouseWheel
void onMouseWheel(GLFWwindow* window, double xoffset, double yoffset)

Event called on mouse wheel action.

onText
void onText(GLFWwindow* window, uint codepoint)

Event called on character input.

onWindowClose
void onWindowClose(GLFWwindow* window)

Event called on window close action.

onWindowResize
void onWindowResize(GLFWwindow* window, int width, int height)

Event called on window resize action.

pollEvents
void pollEvents()

Polls window events.

run
void run()

Deault game loop.

setCursor
void setCursor(Cursor cursor)

Sets window mouse cursor.

setGameState
void setGameState()

Defines current game state.

update
void update(float interpolation)

Processes game rendering.

Properties

assetLoader
AssetLoader assetLoader [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
currentGameState
GameState currentGameState [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
deltaTime
float deltaTime [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
entityManager
EntityManager entityManager [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
graphicsDevice
GraphicsDevice graphicsDevice [@property getter]

Properties.

guiManager
GuiManager guiManager [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
i18n
I18n i18n [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
inputHandler
InputHandler inputHandler [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
maxFrameSkip
int maxFrameSkip [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
maxFrameSkip
int maxFrameSkip [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
running
bool running [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
tickrate
float tickrate [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
window
Window window [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta