Пример #1
0
 private IEnumerator ApplySpellEffect(SpellEffect effect, Unit2D target)
 {
     target.TakeDamage(effect.damage);
     if (effect.slow.slowMultiplier > 0f && effect.slow.duration > 0f)
     {
         target.TakeEffect(effect.slow);
     }
     yield return(null);
 }
Пример #2
0
 protected virtual void Fire()
 {
     target.TakeDamage(damage, () =>
     {
         target = null;
         time   = attackSpeed * .5f;
     });
     if (!target || target.isDead)
     {
         isAttacking = false;
         target      = null;
     }
 }