Winning the game
Just one more thing to do to finish the game. At the moment, the enemies can win the game by destroying the base. But the player can't really win the game. There's no clear end state to kill all the enemies. To finish the game, we will determine fixed winning and losing conditions and add a game screen to clearly tell the player whether they have won or lost the game.
Prepare for lift off
Let's create the screen graphic first by following the given steps:
Click on the paintbrush icon to create a new sprite.
Choose a dark yellow color and draw a large rectangle.
Click on Fill to fill the rectangle with a light yellow color.
Select the Text tool and write the text
YOU WIN!
in the center of the rectangle.Duplicate the costume by selecting Duplicate.
Edit the text in the second costume to read
GAME OVER
.
Engage thrusters
To show the game screen at the right moment and to display the proper costume, we will use a script as shown in the following steps:
Click on the Scripts tab to add some...