GameState

GameState.

Constructors

this
this()

GameState constructor.

Members

Functions

createEntity
Entity createEntity()
Undocumented in source. Be warned that the author may not have intended to support it.
dispose
void dispose()

GameState destructor.

fixedUpdate
void fixedUpdate()

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

onExit
void onExit()

Event called when current game state ends.

onInit
void onInit(Variant[] params)

Event called when current game state is defined as the main state.

onKey
void onKey(int key)

Event called on key action.

onMouseClick
void onMouseClick(vec2 position, MouseButton mouseButton)

Event called on mouse button click action.

onMouseMove
void onMouseMove(vec2 position)

Event called on mouse movement action.

onMouseUp
void onMouseUp(vec2 position, MouseButton mouseButton)

Event called on mouse button release action.

onMouseWheel
void onMouseWheel(int delta)

Event called on mouse wheel action.

onText
void onText(int text)

Event called on character input.

setParent
void setParent(Game game)

Sets game state parent. Called only one time by Game class.

update
void update(float interpolation)

Processes game rendering.

Properties

entityManager
EntityManager entityManager [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
game
Game game [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
graphicsDevice
GraphicsDevice graphicsDevice [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
guiManager
GuiManager guiManager [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

m_assetLoader
AssetLoader m_assetLoader;
Undocumented in source.
m_game
Game m_game;
Undocumented in source.
m_graphicsDevice
GraphicsDevice m_graphicsDevice;
Undocumented in source.
m_guiManager
GuiManager m_guiManager;
Undocumented in source.
m_mouseClicked
bool m_mouseClicked;

Indicates if mouse button is clicked

Meta