Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class MainMenu : MonoBehaviour {
- public GUISkin skin;
- public World1Music world1;
- void OnGUI()
- {
- GUI.skin = skin;
- GUI.Label (new Rect (10, 10, 400, 75), "Go Home");
- if (PlayerPrefs.GetInt ("Level Completed") > 0)
- {
- if(GUI.Button (new Rect (10, 100, 100, 45), "Continue"))
- {
- world1.StartMusic();
- Application.LoadLevel(4);
- }
- }
- if(GUI.Button (new Rect (10, 155, 100, 45), "New Game"))
- {
- PlayerPrefs.SetInt ("Level Completed",0);
- world1.StartMusic();
- Application.LoadLevel(4);
- }
- if(GUI.Button (new Rect (10, 210, 100, 45), "Quit"))
- {
- //Application.Quit();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement