public void TryAttack() { if (m_TakeObjectController.IsTaken) { m_TakeObjectController.Throw(); } else { m_Damager.Attack(); } }
public static void TakingDamage() { var damageable = new Damageable(health: 100); var damager = new Damager(attackDamage: 10); int healthBefore = damageable.Health; damager.Attack(damageable); int healthAfter = damageable.Health; Assert.AreEqual(healthBefore - damager.AttackDamage, healthAfter); }