Ejemplo n.º 1
0
    public void SwitchToNone()
    {
        switch (inputState)
        {
        case InputState.Skill:
            selectedSkill = null;
            selectedChess.CancelSkill();
            goto case InputState.Selected;

        case InputState.Selected:
            selectTask.bPaused = true;
            curTask.Abort();
            curTask = null;
            DeSelect();
            break;

        case InputState.None:
            return;

        case InputState.ReadyToSelect:
            selectTask.bPaused = true;
            break;

        default:
            Debug.LogError("ErrorState");
            break;
        }
        ;
        inputState = InputState.None;
    }
Ejemplo n.º 2
0
    public void SwitchToSelected(GPlayerChess chess)
    {
        switch (inputState)
        {
        case InputState.Skill:
            selectedSkill = null;
            selectedChess.CancelSkill();
            selectTask.bPaused = false;
            curTask.Abort();
            curTask = null;
            break;

        case InputState.Selected:
            curTask.Abort();
            curTask = null;
            Select(chess);
            break;

        case InputState.ReadyToSelect:
            Select(chess);
            break;

        default:
            Debug.LogError("ErrorState");
            break;
        }
        ;
        curTask = CreateMoveCommand(chess);
        curTask.CreateFloorHUD(new Color(0, 1, 0, 0.8f));
        curTask.Begin();
        inputState = InputState.Selected;
    }