public virtual void DoBeforeLeaving()
{
}
// for AI controled FSM transfer public void PerformAITransition(StateID NextStateID) { currentStateID = NextStateID; foreach (FSMState state in states) { if (state.ID == currentStateID) { currentState.DoBeforeLeaving(); currentState = state; currentState.DoBeforeEntering(); break; } } }