// Main Menu Script
// Inspector Variables
function OnGUI ()
{
// Make a group @ center of screen
GUI.BeginGroup(Rect (Screen.width/2-50,Screen.height/2-50,100,175));
//Make a box to see group on screen
GUI.Box(Rect(0,0,100,175),"Main Menu");
//Add buttons for game navigation
if (GUI.Button(Rect(10,30,80,30),"Start Game"))
{
Application.LoadLevel("ScreenLoad");
}
if (GUI.Button(Rect(10,65,80,30),"Credits"))
{
Application.LoadLevel("ScreenCredit");
}
if (GUI.Button(Rect(10,100,80,30),"Exit"))
{
Application.Quit();
}
if (GUI.Button(Rect(10,135,85,30),"Project Blog"))
{
Application.OpenURL("http://celosiaproject.blogspot.com/");
}
GUI.EndGroup();
}
No comments:
Post a Comment