Пример #1
0
        public void SwitchState(string newState)
        {
            AState state = FindState(newState);

            if (state == null)
            {
                Debug.LogError("Can't find the state named " + newState);
                return;
            }

            m_StateStack[m_StateStack.Count - 1].Exit(state);
            state.Enter(m_StateStack[m_StateStack.Count - 1]);
            m_StateStack.RemoveAt(m_StateStack.Count - 1);
            m_StateStack.Add(state);
        }
Пример #2
0
 public override void Enter(AState from)
 {
     throw new System.NotImplementedException();
 }
Пример #3
0
 public override void Exit(AState to)
 {
     throw new System.NotImplementedException();
 }
Пример #4
0
 public abstract void Exit(AState to);
Пример #5
0
 public abstract void Enter(AState from);