Game Over
To make our game challenging, we’re going to make it a race against the clock (or, more accurately, e-meter).
- At the start of the game we want to set our power usage to 0, wait until we reach the maximum amount of power, and then it’s game over.
- Add the following code to your House Sprite .
- Now, click on the “Game Over” sprite.
- Add code that will react to the “game over” message.
- Test your game. When your power usage goes above 1 watt hour, does the game over message appear?
- What happens when you start the game again? It’s still there!