void SetState(State nextState) { if (m_currentState.End != null) { m_currentState.End(); } m_currentState = m_stateDict[nextState]; if (m_currentState.Start != null) { m_currentState.Start(); } }
public void ChangeState(FSMState <T> newState) { if (newState != null) { if (current != null) { current.End(owner, this); } current = newState; current.Begin(owner, this); } }
public void SetEnemyState(FSMState state) { if (mState != null) { state.End(); } mState = state; if (mState != null) { mState.Start(); } }