Exemplo n.º 1
0
    void RunStates()
    {
        switch (currentState)
        {
        case State.Idle:
            currentAction = AssessActions();
            if (currentAction != null)
            {
                currentState = State.PerformAction;
            }
            break;

        case State.MoveTo:
            break;

        case State.PerformAction:
            currentAction.Execute(OnActionComplete, this);
            break;
        }
    }