Example #1
0
    private void StopMusicPlaySpecialEffect(SpecialsController.Special id)
    {
        _spawnnerScript         = Resources.Load <spawnner>("Spawnner Woodpeaker").GetComponent <spawnner>();
        _spawnnerScript.enabled = false;
        SpecialQuantity         = 0;
        var audios = GetComponents <AudioSource>();

        switch (id)
        {
        case SpecialsController.Special.Enel:
            _lightning.Play();
            Watcher.Score += 500 * GameObject.FindGameObjectsWithTag("Woodpeakear").Length;
            audios[0].clip = EnelTalking;
            audios[1].clip = Thunder;
            break;

        case SpecialsController.Special.Frozen:
            _snow.Play();
            audios[0].clip = LetItGo;
            audios[1].clip = Snow;
            break;

        case SpecialsController.Special.David:
            _shacos.Play();
            audios[0].clip = Malandro;
            break;

        default:
            throw new ArgumentOutOfRangeException(nameof(id), id, null);
        }
        audios[2].Pause();
        audios[0].Play();
        audios[1].Play();
    }
Example #2
0
    private IEnumerator FireSpecial(SpecialsController.Special id)
    {
        StopMusicPlaySpecialEffect(id);
        if (SpecialsController.SpecialSelected != SpecialsController.Special.Frozen)
        {
            StartCoroutine(DeactivateBlade());
        }


        switch (id)
        {
        case SpecialsController.Special.Enel:
            _specialEffects.EnelAppear();
            StartCoroutine(SpecialEffectsController.TextAppear("Quando o Enel sair, esse time acaba...", 0.08f, 190));
            break;

        case SpecialsController.Special.Frozen:
            _specialEffects.FrozenAppear();
            StartCoroutine(SpecialEffectsController.TextAppear("Frozen vai com calma no let it go...", 0.08f, 190));
            break;

        case SpecialsController.Special.David:
            _specialEffects.SolrakAppear();
            StartCoroutine(SpecialEffectsController.TextAppear("Solrak foi pro unilol no seu lugar, perdeu seu especial", 0.08f, 190));
            break;

        default:
            throw new ArgumentOutOfRangeException(nameof(id), id, null);
        }

        yield return(null);
    }