// Win Screen Script
// Inspector *Script attach to main camera
var winQuote : String = "You WIN!";
//
function OnGUI ()
{
// Make a group @ center of screen
GUI.BeginGroup(Rect (Screen.width/2-100,Screen.height/2-100,200,200));
// make box to see the group on screen
GUI.Box(Rect(0,0,200,100),winQuote);
//Scores
GUI.Label(Rect(10,30,100,50),"Score:"+PlayerPrefs.GetInt("SCORE"));
//Back to main button
if(GUI.Button(Rect(60,60,80,30), "Main Menu"))
{
Application.LoadLevel("ScreenMainMenu");
}
// End group
GUI.EndGroup();
}
No comments:
Post a Comment