Game Development Reference
In-Depth Information
30*_serverHiscore.userLength));
for (int i = 0; i < _serverHiscore.userLength;
i++) {
GUILayout.BeginHorizontal(GUILayout.Width(300));
GUILayout.Label((i+1).ToString() + ". " +
_serverHiscore.GetUserDataAt(i).name,
GUI.skin.GetStyle("Name"));
GUILayout.Label(_serverHiscore.GetUserDataAt(i).score.AddCommas(),
GUI.skin.GetStyle("Score"));
GUILayout.EndHorizontal();
}
GUI.EndScrollView();
} else {
GUI.Label(new Rect((Screen.width-150)*0.5f,
(Screen.height*0.1f)+120, 150, 50), "LOADING...",
GUI.skin.GetStyle("CustomText"));
}
if (GUI.Button(_buttonRect3, "BACK")) {
_page = PAGE.GAMEOVER;
}
}
We just created the scroll view for our server high score table. Now, we have finished this
project. We can click on the Play button to see the result.
Search WWH ::




Custom Search