Game Development Reference
In-Depth Information
We can also include StaticVars.b_isGameOver = true; in the
Start() funcion to see our GAMEOVER menu, right away.
We can click on the LOCAL HI-SCORE buton or SERVER HI-SCORE buton to go to another
page, click on the RESTART buton to replay the game, enter the name or the text ield and
click on the SUBMIT buton, even though it won't save or send any score right now. At the
LOCAL HI-SCORE or SERVER HI-SCORE page, you can also see the BACK buton to go back to
the GAMAEOVER menu, and the RESTART buton to restart the game.
In the next step, we will be creaing the script to save the local high score for the user, which
will check whether the player's inal score is saved or not. This script will automaically sort
the score order from the maximum to minimum, and display it to the scoreboard.
Objective Complete - Mini Debriefing
We just inished creaing the GAMEOVER menu that will display the player's final score, has
the opion for the player to submit his/her score, and a buton to see the local scoreboard as
well as the server scoreboard.
First, we created the userName parameter to set the default username on the Submit
text field, and maxUsers to limit the maximum number of users that will display on
our scoreboard.
Then, we created the enum variable to check for the current page of our menu, which
contains the GAMEOVER page, local score page, and server score page. We also have the
scrollPosition parameter to create the scrolled area for the high score table. Then, we
have two boolean parameters to check whether the RESTART and SUBMIT butons have
been clicked by the user or not.
 
Search WWH ::




Custom Search