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); }
public override void Enter(AState from) { throw new System.NotImplementedException(); }
public override void Exit(AState to) { throw new System.NotImplementedException(); }
public abstract void Exit(AState to);
public abstract void Enter(AState from);