#include <statemachine.h>
Public Member Functions | |
StateMachine (irr::IrrlichtDevice *d) | |
~StateMachine () | |
Destructor. | |
void | addState (State *s) |
void | pushEvent (irr::c8 *event) |
void | update (irr::u32 deltaTime) |
State * | getCurrentState (void) |
void | startWith (State *s) |
Each game State is able to push events on this event stack. Events are send to active game State. Game State can accept or reject the event. If event is the name of any game State, the named game State will be the new active game State.
Definition at line 14 of file statemachine.h.
|
Constructor.
|
|
Usualy called multiple times from main()
Definition at line 23 of file statemachine.cpp. |
|
Definition at line 75 of file statemachine.cpp. |
|
Pushes an event on the event stack. |
|
Sets first game State to receive events.
Definition at line 80 of file statemachine.cpp. References State::entry(), State::getName(), and Debug::log(). |
|
Usualy called from infinit loop in main().
|