Advertisement
kasru

Basic Menu

Jan 29th, 2013
4,956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //****** Donations are greatly appreciated.  ******
  2. //****** You can donate directly to Jesse through paypal at  https://www.paypal.me/JEtzler   ******
  3.  
  4. var GUIEnabled : boolean = false;
  5.  
  6. function Update () {
  7.     if(Input.GetKeyDown("n")) {
  8.         GUIEnabled = !GUIEnabled;
  9.     }
  10. }
  11.      
  12. function OnGUI () {
  13.     if(GUIEnabled) {
  14.             if (GUI.Button (Rect (Screen.width / 2,Screen.height / 2 - 40,80,20), "Help")) {
  15.  
  16.         }
  17.  
  18.             if (GUI.Button (Rect (Screen.width / 2,Screen.height / 2 - 20,80,20), "Options")) {
  19.        
  20.         }
  21.  
  22.         if (GUI.Button (Rect (Screen.width / 2,Screen.height / 2,80,20), "Exit")) {
  23.             GUIEnabled = !GUIEnabled;
  24.         }
  25.         }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement