dEngine
Simple 2D C++ game engine
GameStates.h
Go to the documentation of this file.
1 #ifndef DENGINE_GAMESTATES_H
2 #define DENGINE_GAMESTATES_H
3 
4 namespace dengine {
9  enum GAMESTATES {
30  };
31 
37  class GameState {
38  public:
39  GameState();
40 
41  ~GameState();
42 
48  int getGameState();
49 
55  void setGameState(int state);
56 
57  static GameState &GetInstance();
58 
59  private:
62  };
63 }
64 #endif //DENGINE_GAMESTATES_H
~GameState()
Definition: GameState.cpp:11
static GameState instance
Definition: GameStates.h:61
void setGameState(int state)
Set the game state. This can be done with an int or with the GAMESTATES enum.
Definition: GameState.cpp:19
Pause Screen.
Definition: GameStates.h:17
GAMESTATES
Available game states Used largely by the GameState class, this enum is meant to keep up with the cur...
Definition: GameStates.h:9
Manges and stores the current state of the game GameState is used to manage the current state of the ...
Definition: GameStates.h:37
int currentstate
Definition: GameStates.h:60
int getGameState()
Retrieve the current gamestate.
Definition: GameState.cpp:15
GameState()
Definition: GameState.cpp:7
User initiated quit.
Definition: GameStates.h:29
Currently Playing.
Definition: GameStates.h:21
Splash Screen.
Definition: GameStates.h:13
Game over screen.
Definition: GameStates.h:25
The namespace containing the engine's code.
Definition: Collider.h:9
static GameState & GetInstance()
Definition: GameState.cpp:23