Beispiel #1
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;
    }
Beispiel #2
0
    public void SwitchToSkill(PlayerSkill skill)
    {
        switch (inputState)
        {
        case InputState.Selected:
        case InputState.Skill:
            curTask.Abort();
            curTask = null;
            break;

        default:
            Debug.LogError("ErrorState");
            break;
        }
        ;
        selectTask.bPaused = true;
        curTask            = skill.CallGetPlayerInput();
        selectedChess.PrepareSkill(skill);
        curTask.CreateFloorHUD(new Color(0, 1, 1, 0.8f));
        curTask.Begin();
        inputState = InputState.Skill;
    }