Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 3
0
 public void Reset() {
     if (currentState != null)
         currentState.Exit();
     currentState = defaultState;
     foreach (FSMState state in states)
         state.Init();
     if (currentState != null)
         currentState.Enter();
 }
Ejemplo n.º 4
0
 public void Reset()
 {
     if (currentState != null)
     {
         currentState.Exit();
     }
     currentState = defaultState;
     foreach (FSMState state in states)
     {
         state.Init();
     }
     if (currentState != null)
     {
         currentState.Enter();
     }
 }