Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var boxbg : Texture2D;
- var SceneOne : String;
- var SceneOneName : String = "Level One";
- var SceneTwo : String;
- var SceneTwoName : String = "Level Two";
- var SceneThree : String;
- var SceneThreeName : String = "Level Three";
- function OnGUI()
- {
- GUI.BeginGroup (Rect (Screen.width/2-50, Screen.height/2-50, Screen.width, Screen.height));
- GUI.Box (Rect (0,0,150,200), boxbg);
- if (GUI.Button(Rect(10,10,125,30),SceneOneName))
- {
- Application.LoadLevel(SceneOne);
- }
- if (GUI.Button(Rect(10,50,125,30),SceneTwoName))
- {
- Application.LoadLevel(SceneTwo);
- }
- if (GUI.Button(Rect(10,90,125,30),SceneThreeName))
- {
- Application.LoadLevel(SceneThree);
- }
- if (GUI.Button(Rect(10,130,125,30),"Quit"))
- {
- Application.Quit();
- }
- GUI.EndGroup();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement