Example #1
0
 private void GotoNextState()
 {
     currentState.OnComplete -= StateCompleted;
     currentState             = stateQueue.Dequeue();
     currentState.OnComplete += StateCompleted;
     currentState.Enter();
 }
Example #2
0
        private void SetIdleState()
        {
            if (stateQueue.Count > 0)
            {
                GotoNextState();
                return;
            }
            IdleState initialState = AddState <IdleState>();

            initialState.OnComplete += StateCompleted;
            initialState.Enter();
            currentState = stateQueue.Dequeue();
        }
Example #3
0
 public void Enqueue(AIMachineState newState)
 {
     stateQueue.Enqueue(newState);
 }