Exemplo n.º 1
0
    public void SageSelected()
    {
        EnableSelectionButtons(false);

        if (magicButtonSelected)
        {
            if (sageController.IsGuardUp())
            {
                sageController.StartCoroutine(sageController.OnGuardUp());
                magicButtonSelected = false;
                EnableAllButtons(true);
            }
            else
            {
                valkyrieController.StartCoroutine(valkyrieController.OnMagic(3));
                stateText.text = "ATTACK DOWN";
            }
        }
        else if (potionButtonSelected)
        {
            if (sageController.isHealthFull())
            {
                sageController.StartCoroutine(sageController.OnHealthFull());
                potionButtonSelected = false;
                EnableAllButtons(true);
            }
            else
            {
                sageController.StartCoroutine(sageController.OnPotion(2500));
            }
        }
        else if (manaButtonSelected)
        {
            if (sageController.isMagicFull())
            {
                sageController.StartCoroutine(sageController.OnMagicFull());
                manaButtonSelected = false;
                EnableAllButtons(true);
            }
            else
            {
                sageController.StartCoroutine(sageController.OnMana(4000));
            }
        }
    }