public void Advance(Transition trans) { StateID id; if (currentState.TryTransition(trans, out id)) { // Reset the state to its desired condition before it can reason or act currentState.OnExit(); // Update the currentState currentState = states[id]; currentState.OnEnter(); currentState.Do(); } }
public void DoState() { m_currentState.CheckCondition(m_Data); m_currentState.Do(m_Data); }