Sunday, March 9, 2014

Lose Screen Script

// Lose Screen Script

// Inspector *Script attach to main camera
var loseQuote : String = "You Lose";

//
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),loseQuote);

//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