Beispiel #1
0
 public void ChangeState(AI_RTS_MonoGame.AI.FSM.FSMState.FSMStates state, bool reenter = false) {
     if (reenter || state != currentState.Type)
     {
         currentState.Exit();
         currentState = GetGoalState(state);
         currentState.Enter();
     }
 }
Beispiel #2
0
 public void ChangeState(AI_RTS_MonoGame.AI.FSM.FSMState.FSMStates state, bool reenter = false)
 {
     if (reenter || state != currentState.Type)
     {
         currentState.Exit();
         currentState = GetGoalState(state);
         currentState.Enter();
     }
 }
Beispiel #3
0
 public void Reset() {
     if (currentState != null)
         currentState.Exit();
     currentState = defaultState;
     foreach (FSMState state in states)
         state.Init();
     if (currentState != null)
         currentState.Enter();
 }
Beispiel #4
0
 public void Reset()
 {
     if (currentState != null)
     {
         currentState.Exit();
     }
     currentState = defaultState;
     foreach (FSMState state in states)
     {
         state.Init();
     }
     if (currentState != null)
     {
         currentState.Enter();
     }
 }