public void TakeDamage(int amount) { Health -= amount; if (Health <= 0) { Die(); } else { TakeDamageEvent takeDamageEvent = new TakeDamageEvent(this.gameObject, takeDamageSound, takeDamageParticle); takeDamageEvent.FireEvent(); } }
public void TakeDamage(int amount) { Health -= amount; if (Health <= 0) { Die(); } else { TakeDamageEvent takeDamageEvent = new TakeDamageEvent(this.gameObject, takeDamageSound, takeDamageParticle); takeDamageEvent.FireEvent(); } }