AttackableUnit enemy = new AttackableUnit(health: 100, defense: 10);
enemy.TakeDamage(damageAmount: 20);
if (enemy.IsDead()) { Debug.Log("Enemy is dead!"); }This checks if the enemy has zero or less health and returns a boolean value. The AttackableUnit class belongs to the UnityEngine namespace, which is part of the Unity3D game development library.