/// <summary> /// Helper method that damages the target object /// </summary> /// <param name="target">Damagable target object</param> /// <param name="amount">Damage amount</param> private void ProcessAttack(IDamagable target, int amount) { target.ModifyHealth(amount); }
// Actual effect which powerup has on entity it was applied to public void ApplyTo(IDamagable damagable) { damagable.ModifyHealth(_healthAmount); Destroy(gameObject); }