Nano War - Interface and game ending
6. Interface and game ending
The little fighter
If you inspect the playfield, you can see that it contains a radar zone at the top, and we have dropped there a little version of our player's ship, called "Interface_Fighter". In this step we are going to animate this little ship. This is done very simply by constantly setting its position to a fraction of the position of the main fighter ship.
(interface_fighter) : Set X position to X( " (interface)" ) + ( X( " (fighter)" ) - 960 ) / 7
Detecting the end of the game
When the number of lives reaches zero, the game must end. In our case, we will be going to the next frame, which will contain the high score table. With this last event, the engine of our game is complete.
- Number of lives of (Player 1) = 0
: Next frame
Spread the word!
You can share this document using the following buttons.