/* * .##.....##.########.##.......########..########.########...######. * .##.....##.##.......##.......##.....##.##.......##.....##.##....## * .##.....##.##.......##.......##.....##.##.......##.....##.##...... * .#########.######...##.......########..######...########...######. * .##.....##.##.......##.......##........##.......##...##.........## * .##.....##.##.......##.......##........##.......##....##..##....## * .##.....##.########.########.##........########.##.....##..######. */ private void TakeDamage(float damage) { if (invisible) { return; } _health.ApplyDamage(damage); _damageDisplayManager.TakeDamage(); }
private void TakeDamage(float damage) { if (!invisible) { invisible = false; _health.ApplyDamage(damage); } _simpleDamageDisplayManager.TakeDamage(); }
protected override void ApplyDamage(IHealth health) { health.ApplyDamage(_damage); }
// private void AddTargetToNotify(GameObject target){ // targetsToNotify.Add(target); // } // public void RemoveTargetToNotify(GameObject target){ // targetsToNotify.Remove(target); // } public void ApplyDamage(ICharacter instigator, float damage) { _health.ApplyDamage(GetBlockingDamage(instigator, damage)); }
private void OnCollisionEnter2D(Collision2D other) { _health.ApplyDamage(10.0f); }
void IBullet.ApplyDamageOnHit(IHealth hitObject) { hitObject.ApplyDamage(damage); }