public AState ChangeState(AState state) { AState result = PopState(); PushState(state); return(result); }
public AState PopState() { AState result = _stack.Pop(); result.Exit(); return(result); }
public void PushState(AState state) { _stack.Push(state); state.Enter(); }