public bool Contains(IAIState state) { if (_stateMachine == null) { return(false); } return(_stateMachine.Contains(state)); }
public T StackState(T state) { if (!object.ReferenceEquals(state, null) && !_machine.Contains(state)) { throw new System.ArgumentException("MovementStyle is not a member of the state machine.", "style"); } _stateStack.Push(_machine.Current); return(_machine.ChangeState(state)); }
public void ChangeState(FSMState fsm, ICommand ev) { if (mMachine == null || this.CacheTransform == null) { return; } if (FSM == FSMState.FSM_DEAD && fsm != FSMState.FSM_REBORN) { return; } if (!mMachine.Contains(fsm)) { return; } mMachine.GetState(fsm).SetCommand(ev); mMachine.ChangeState(fsm); }