Пример #1
0
    private void Debuff()
    {
        soundScript.PlaySound(TYPE_AUDIO.Malus);
        int randomDebuff = Random.Range(1, 5);

        switch (randomDebuff)
        {
        case 1:
            playerScript.HalfWood();
            godVoiceDisplay.color = new Color(1, 1, 1, 1);
            godVoiceDisplay.text  = "Si je ne peux pas l'avoir, personne ne l'aura !";
            StartCoroutine(GodVoiceFade());
            break;

        case 2:
            treeManagerScript.DamageTree();
            godVoiceDisplay.color = new Color(1, 1, 1, 1);
            godVoiceDisplay.text  = "Roulez jeunesse !";
            StartCoroutine(GodVoiceFade());
            break;

        case 3:
            treeManagerScript.DestroyTree();
            godVoiceDisplay.color = new Color(1, 1, 1, 1);
            godVoiceDisplay.text  = "Pas de bras, pas d'arbre";
            StartCoroutine(GodVoiceFade());
            break;

        case 4:
            villageScript.DestroyAHouse();
            godVoiceDisplay.color = new Color(1, 1, 1, 1);
            godVoiceDisplay.text  = "Du balais !";
            StartCoroutine(GodVoiceFade());
            break;

        case 5:
            villageScript.HalfPassivGain();
            godVoiceDisplay.color = new Color(1, 1, 1, 1);
            godVoiceDisplay.text  = "Bande de faibles";
            StartCoroutine(GodVoiceFade());
            break;

        default:
            Debug.Log("Debbuff Error");
            break;
        }
    }