示例#1
0
    public void OnMagicButton1()
    {
        magicButtonSelected = true;
        EnableMagicButtons(false);
        EnableAllButtons(false);

        switch (currentTurn)
        {
        case Turn.PALADIN:
        {
            if (!enemyController.IsAttackDown())
            {
                paladinController.StartCoroutine(paladinController.OnMagic());
                stateText.text = "ATTACK DOWN";
            }
            else
            {
                paladinController.StartCoroutine(paladinController.OnMagic());
                EnableAllButtons(true);
            }
        }
        break;

        case Turn.VALKYRIE:
        {
            EnableSelectionButtons(true);
        }
        break;

        case Turn.SAGE:
        {
            sageController.StartCoroutine(sageController.OnMagic(1));
            stateText.text = "EARTH SPELL";
        }
        break;
        }
    }