Пример #1
0
 /// <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);
 }
Пример #2
0
 // Actual effect which powerup has on entity it was applied to
 public void ApplyTo(IDamagable damagable)
 {
     damagable.ModifyHealth(_healthAmount);
     Destroy(gameObject);
 }