Ejemplo n.º 1
0
 public void FixedUpdateStack()
 {
     if (m_stateStack.Count > 0)
     {
         FlowStateBase state = m_stateStack.Peek();
         state.FixedUpdateState();
     }
 }
Ejemplo n.º 2
0
 public void UpdateStack()
 {
     if (m_stateStack.Count > 0)
     {
         FlowStateBase state = m_stateStack.Peek();
         state.UpdateState();
         if (state.IsDismissed())
         {
             m_stateStack.Pop();
         }
     }
 }
Ejemplo n.º 3
0
 public void PopState(FlowStateBase state)
 {
     Debug.Assert(m_stateStack.Count > 0 && m_stateStack.Peek() == state, "Trying to pop non active state");
     m_stateStack.Peek().EndActiveState();
 }
Ejemplo n.º 4
0
 public void PushState(FlowStateBase state)
 {
     Debug.Assert(m_stateStack.Count == 0 || m_stateStack.Peek() != state, "Trying to push already active state");
     m_stateStack.Push(state);
     state.SetStateController(this);
 }