public BehaviourSM(AIController owner) { this.owner = owner; stateStack = new Stack<BehaviourState>(); baseState = new Behaviour_Idle(); baseState.EnterState(owner); currentState = baseState; }
public void ResetDefault() { stateStack.Clear(); if(currentState != baseState) { currentState.ExitState(owner); } baseState = new Behaviour_Idle(); baseState.EnterState(owner); currentState = baseState; }