Tower defense games typically end when a certain amount of enemies reach the end of a map's trail. Here, we'll speed up enemies, track how many lives are available to our player, and display some "Game Over" text whenever our heart count reaches 0.
0:00 Speed up enemies
9:01 Track when enemies go off map
10:40 Spawn more enemies when all reach end
12:24 Create game over scenario
14:35 Add game over text
27:09 Only display game over text when heart count is 0