private void GotoNextState() { currentState.OnComplete -= StateCompleted; currentState = stateQueue.Dequeue(); currentState.OnComplete += StateCompleted; currentState.Enter(); }
private void SetIdleState() { if (stateQueue.Count > 0) { GotoNextState(); return; } IdleState initialState = AddState <IdleState>(); initialState.OnComplete += StateCompleted; initialState.Enter(); currentState = stateQueue.Dequeue(); }
public void Enqueue(AIMachineState newState) { stateQueue.Enqueue(newState); }