Beispiel #1
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);
    }
Beispiel #2
0
    private void GetInitialReferences()
    {
        _rb             = GetComponent <Rigidbody2D>();
        _cam            = Camera.main;
        _bladeCollider  = GetComponent <CircleCollider2D>();
        SpecialQuantity = 0;
        _lightning      = GameObject.Find("lightning").GetComponent <ParticleSystem>();
        _snow           = GameObject.Find("snow").GetComponent <ParticleSystem>();
        _shacos         = GameObject.Find("shacos").GetComponent <ParticleSystem>();
        _watcher        = GameObject.Find("Watcher").GetComponent <Watcher>();
        _spawnnerScript = GameObject.Find("Spawnner Woodpeaker").GetComponent <spawnner>();
        _specialEffects = _watcher.GetComponent <SpecialEffectsController>();

        _canCut = true;
        //_audioSource = GetComponent<AudioSource>();
    }