Exemplo n.º 1
0
    private IEnumerator Petrify()
    {
        animationController.Play("Petrify Animation");

        yield return(new WaitForSeconds(1));

        chance = Random.Range(1, 3);

        switch (chance)
        {
        case 1:
            paladinController.SetIsPetrified(true);
            paladinController.StartCoroutine(paladinController.Petrified());
            break;

        case 2:
            valkyrieController.SetIsPetrified(true);
            valkyrieController.StartCoroutine(valkyrieController.Petrified());
            break;

        case 3:
            sageController.SetIsPetrified(true);
            sageController.StartCoroutine(sageController.Petrified());
            break;
        }

        petrifyCount = 0;
    }
Exemplo n.º 2
0
    private IEnumerator ShowPetrificationStatus(int type)
    {
        switch (type)
        {
        case 1:
        {
            selectText.text    = "PALADIN IS PETRIFIED";
            selectText.enabled = true;
            yield return(new WaitForSeconds(2));

            selectText.enabled = false;
            UpdateTurn();
            paladinController.SetIsPetrified(false);
        }
        break;

        case 2:
        {
            selectText.text    = "VALKYRIE IS PETRIFIED";
            selectText.enabled = true;
            yield return(new WaitForSeconds(2));

            selectText.enabled = false;
            UpdateTurn();
            valkyrieController.SetIsPetrified(false);
        }
        break;

        case 3:
        {
            selectText.text    = "SAGE IS PETRIFIED";
            selectText.enabled = true;
            yield return(new WaitForSeconds(2));

            selectText.enabled = false;
            UpdateTurn();
            sageController.SetIsPetrified(false);
        }
        break;
        }
    }