Advertisement
Guest User

Untitled

a guest
Aug 16th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class MainMenu : MonoBehaviour {
  5. public GUISkin skin;
  6. public World1Music world1;
  7.  
  8. void OnGUI()
  9. {
  10. GUI.skin = skin;
  11. GUI.Label (new Rect (10, 10, 400, 75), "Go Home");
  12. if (PlayerPrefs.GetInt ("Level Completed") > 0)
  13. {
  14. if(GUI.Button (new Rect (10, 100, 100, 45), "Continue"))
  15. {
  16. world1.StartMusic();
  17. Application.LoadLevel(4);
  18. }
  19. }
  20. if(GUI.Button (new Rect (10, 155, 100, 45), "New Game"))
  21. {
  22. PlayerPrefs.SetInt ("Level Completed",0);
  23. world1.StartMusic();
  24. Application.LoadLevel(4);
  25.  
  26. }
  27.  
  28. if(GUI.Button (new Rect (10, 210, 100, 45), "Quit"))
  29. {
  30. //Application.Quit();
  31. }
  32.  
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement