Game Development Reference
In-Depth Information
GUI.Label(new Rect(155, i * 30, 145, 30), GlobalFunction.
addCommasInt(obj_localHiScore.GetScoreData(i)), GUI.skin.
GetStyle("Score"));
}
GUI.EndScrollView (); //End Scroll Area
if (GUI.Button(new Rect((Screen.width - 240)*0.5, (Screen.
height*0.1) + 280, 240, 30), "BACK")) {
e_page = Page.GAMEOVER;
}
}
These two lines will load the username and score, and display it on the scrolled area in the
LOCAL HI_SCORE menu page.
Next, we can go back to Unity, click Play , and try to complete the game by killing all the
enemies to bring up the GAMEOVER menu. Right now, we will be able to enter our name,
submit the score, and see the high score board if we click on the LOCAL HI-SCORE buton:
We typed our name and clicked to submit the score.
 
Search WWH ::




Custom Search