public void InflictDamage(int dmg, int damageType) { int healthValue = GetHealth() - dmg; SetHealth(healthValue); if (healthValue > 0) { healthBar.AddInfo(dmg, damageType); } }
public void InflictDamage(int dmg, int damageType) { int healthValue = GetHealth() - dmg; SetHealth(healthValue); if (healthValue > 0) { healthBar.AddInfo(dmg, damageType); } }