18 #ifndef ZENI_GAMESTATE_HXX
19 #define ZENI_GAMESTATE_HXX
30 m_pausable = pausable_;
33 void Gamestate_Base::increment() {
37 void Gamestate_Base::decrement() {
57 : m_state(state.m_state)
65 state.m_state->increment();
70 m_state = state.m_state;
Gamestate & operator=(const Gamestate &state)
void on_event(const SDL_Event &event)
void set_pausable(const bool &pausable_)
virtual void render()
Then render. Called by Game as part of the main gameloop.
virtual void on_pop()
Called when the Gamestate is popped off the stack in Game.
virtual void prerender()
No actual rendering, but any logic strictly necessary for rendering.
const bool & is_pausable() const
A smartpointer for a Gamestate_Base.
const bool & is_pausable() const
virtual void on_event(const SDL_Event &event)
First check for events. Called by Game as part of the main gameloop.
virtual void on_uncover()
Called when a Gamestate is popped off Game, making this Gamestate on top.
The base class for all gamestates.
virtual void on_push()
Called when the Gamestate is pushed onto the stack in Game.
virtual void perform_logic()
Then perform logic. Called by Game as part of the main gameloop.
virtual void on_cover()
Called when a Gamestate is pushed on top of this Gamestate in Game.