What happens when this condition is true?
if (enemy.health <= 0) destroy(enemy);
- The enemy is removed
- The enemy becomes stronger
- The enemy respawns immediately
- The enemy is invincible
If health is zero or less, the enemy object is typically destroyed.
Play Game Dev ▸