private void OnDamageTaken(DamageEventArgs args) { if (DamageTaken != null) { DamageTaken(args); } }
public void TakeDamage(Damage damage) { ModifyHealth(-damage.Value); var args = new DamageEventArgs(Self, damage); OnDamageTaken(args); //TODO, replace with a kill callback in TakeDamage if (HealthPercentage <= 0f) { Die(damage.Source); } }