Exemplo n.º 1
0
 public void Damage(DamageInfo damage)
 {
     if (damage.Damage > 0)
     {
         health.Damage(damage.Damage);
         Damaged?.Invoke();
     }
     else
     {
         UndamagedHit?.Invoke();
     }
 }
Exemplo n.º 2
0
 public void Damage(DamageInfo damage)
 {
     if (enemy.Element == damage.Element)
     {
         if (damage.Damage > 0)
         {
             health.Damage(damage.Damage);
             Damaged?.Invoke();
         }
         else
         {
             UndamagedHit?.Invoke();
         }
     }
     else
     {
         UndamagedHit?.Invoke();
     }
 }