Game Development Reference
In-Depth Information
12. Go back to the DisplayGUI script in MonoDevelop script editor. We need
to define the OnGUI function to put the code for our game interface. Add the
following lines to the script:
function OnGUI () {
GUI.skin=myGUISkin;
GUI.color = Color.white;
//pl1 score
GUI.Label (Rect (0, 5, 200, 40),
"SCORE <1>");
GUI.Label (Rect (0, 20, 200, 40),
DisplayScore.Score.ToString());
Search WWH ::




Custom Search