예제 #1
0
 private void DealMeleeDamage(Health targetHealth)
 {
     if (currentWeapon.GetDamage() > 0)
     {
         bool died = targetHealth.Damage(currentWeapon.GetDamage());
         if (died)
         {
             target = null;
         }
     }
     if (currentWeapon.GetDamage() < 0)
     {
         targetHealth.Heal(-currentWeapon.GetDamage());
     }
 }