예제 #1
0
    public BehaviourSM(AIController owner)
    {
        this.owner = owner;

        stateStack = new Stack<BehaviourState>();
        baseState = new Behaviour_Idle();
        baseState.EnterState(owner);
        currentState = baseState;
    }
예제 #2
0
 public void ResetDefault()
 {
     stateStack.Clear();
     if(currentState != baseState) {
         currentState.ExitState(owner);
     }
     baseState = new Behaviour_Idle();
     baseState.EnterState(owner);
     currentState = baseState;
 }