Dragonfly 4.20
A text-based game engine
|
Public Member Functions | |
StateMachine () | |
void | setOwner (Object *p_new_owner) |
Object * | getOwner () const |
void | setState (State *p_new_state) |
State * | getState () const |
void | setPreviousState (State *p_new_state) |
State * | getPreviousState () const |
void | setGlobalState (State *p_new_state) |
State * | getGlobalState () const |
void | Update () |
void | changeState (State *p_new_state) |
void | revertToPrevious () |
Private Attributes | |
Object * | m_p_owner |
State * | m_p_state |
State * | m_p_previous_state |
State * | m_p_global_state |
df::StateMachine::StateMachine | ( | ) |
Global state (reachable from any state).
void df::StateMachine::changeState | ( | State * | p_new_state | ) |
Change current state.
State * df::StateMachine::getGlobalState | ( | ) | const |
Get global state.
Object * df::StateMachine::getOwner | ( | ) | const |
Get owner of state machine.
State * df::StateMachine::getPreviousState | ( | ) | const |
Get previous state.
State * df::StateMachine::getState | ( | ) | const |
Get current state.
void df::StateMachine::revertToPrevious | ( | ) |
Revert to previous state.
void df::StateMachine::setGlobalState | ( | State * | p_new_state | ) |
Set global state.
void df::StateMachine::setOwner | ( | Object * | p_new_owner | ) |
Set owner of state machine.
void df::StateMachine::setPreviousState | ( | State * | p_new_state | ) |
Set previous state.
void df::StateMachine::setState | ( | State * | p_new_state | ) |
Set current state.
void df::StateMachine::Update | ( | ) |
Update state machine (calling Execute() for current state).
|
private |
Previous state.
|
private |
Current state.
|
private |
Owner of this state machine.