29 #include "nomlib/system/GameStates.hpp"
38 GameStates::GameStates (
void )
40 NOM_LOG_TRACE ( NOM );
46 states.back()->HandleInput ( event );
52 states.back()->update ( delta_time );
58 states.back()->draw ( target );
73 states.push_back( std::move( state ) );
78 void GameStates::PushState ( std::unique_ptr<IState> state )
89 states.push_back( std::move( state ) );
94 void GameStates::PopState (
void )
106 void GameStates::PopState ( int32 response )
115 states.back()->Resume ( response );
118 void GameStates::PopStateThenChangeState ( std::unique_ptr<IState> state )
126 NOM_ASSERT ( state );
static void draw(IDrawable::RenderTarget)
State rendering.
static void onEvent(EventType *)
State events handling.
static std::vector< std::unique_ptr< IState > > states
States stack; we hold pointer references to IState inherited classes.
static void update(float)
State logic.
static void ChangeState(std::unique_ptr< IState > state)
State management.