public void SetState(FSMState state) { if (this._stateStack.Count != 0) this.OnStatFinished(this._states[this._stateStack[0]]); this._stateStack.Add(state.stateId); state.OnStateEnter(); }
public void MoveToState(StateId state) { currentState.OnStateExit(); m_preStateId = m_curStateId; m_curStateId = state; preState = currentState; currentState = CreateState(state); currentState.OnStateEnter(); }
public void MoveToState(StateId state) { currentState.OnStateExit(); m_preStateId = m_curStateId; m_curStateId = state; preState = currentState; currentState = CreateState(state); currentState.OnStateEnter(); }