Game Development Reference
In-Depth Information
name
_user.name = GUI.TextField(new
Rect((Screen.width - 240)*0.5f, (Screen.height*0.1f)
+ 120, 240, 40), _user.name, 8);
//Submit button
if (GUI.Button(_buttonRect1, "SUBMIT")) {
_clickSubmit = true;
_user.score = HitPoint.CURRENT_SCORE;
//Submitting both local and server high score
here
}
}
}
// C# user:
void Gameover ()
{
if (_clickSubmit == false) {
GUI.Label(new Rect((Screen.width - 300)*0.5f,
(Screen.height*0.1f) + 80, 300, 25), "Enter Your
Name", GUI.skin.GetStyle("CustomText3"));
//Creating the input text field to get the player
name
_user.name = GUI.TextField(new
Rect((Screen.width - 240)*0.5f, (Screen.height*0.1f)
+ 120, 240, 40), _user.name, 8);
//Submit button
if (GUI.Button(_buttonRect1, "SUBMIT")) {
_clickSubmit = true;
_user.score = HitPoint.CURRENT_SCORE;
//Submitting both local and server high score
here
}
}
Search WWH ::




Custom Search