IEnumerator ApplyEffect()
    {
        float time = 0;

        animator.SetBool(EnemyAnimator.EFFECT, true);
        while (time < effectTime)
        {
            time += Time.deltaTime;
            timer = 0;
            Movement.SlowDown(0, Time.deltaTime * 2);
            yield return(0);
        }

        SetWaitTime();
        if (!IsDead)
        {
            powerEffect.ApplyEffect();
            if (particleEffect != null)
            {
                particleEffect.Play();
            }
        }
        animator.SetBool(EnemyAnimator.EFFECT, false);
    }
Beispiel #2
0
 public override void Die()
 {
     deathEffect.ApplyEffect();
     base.Die();
 }