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