|
dEngine
Simple 2D C++ game engine
|
Manges and stores the current state of the game GameState is used to manage the current state of the game as a whole. A few game states that are built in reference whether the game is currently being played, at the gameover screen, or at the flash screen. More...
#include <GameStates.h>
Public Member Functions | |
| GameState () | |
| ~GameState () | |
| int | getGameState () |
| Retrieve the current gamestate. More... | |
| void | setGameState (int state) |
| Set the game state. This can be done with an int or with the GAMESTATES enum. More... | |
Static Public Member Functions | |
| static GameState & | GetInstance () |
Private Attributes | |
| int | currentstate = GAMESTATES::Splash |
Static Private Attributes | |
| static GameState | instance |
Manges and stores the current state of the game GameState is used to manage the current state of the game as a whole. A few game states that are built in reference whether the game is currently being played, at the gameover screen, or at the flash screen.
| GameState::GameState | ( | ) |
| GameState::~GameState | ( | ) |
| int GameState::getGameState | ( | ) |
Retrieve the current gamestate.
Referenced by dengine::Game::loop().
|
static |
Referenced by dengine::Game::Game(), dengine::Game::loop(), and dengine::EventSystem::processEvents().
| void GameState::setGameState | ( | int | state | ) |
Set the game state. This can be done with an int or with the GAMESTATES enum.
| state | The current state of the game |
Referenced by dengine::Game::Game(), and dengine::EventSystem::processEvents().
|
private |
Referenced by getGameState(), and setGameState().
|
staticprivate |
Referenced by GetInstance().
1.8.13