Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class GameMenu : MonoBehaviour {
- private Rect OptionsRect = new Rect (20,20,120,50);
- private bool showOptionsWindow = false;
- void OnGUI ()
- {
- if (GUI.Button (new Rect ( 25,25,100,30), "New Game"))
- {
- Application.LoadLevel ( 2 );
- }
- if (GUI.RepeatButton (new Rect ( 25,70,100,30), "Options"))
- showOptionsWindow = true;
- if (GUI.Button (new Rect ( 25,115,100,30), "Exit"))
- {
- Application.Quit ();
- }
- if (showOptionsWindow)
- OptionsRect = GUI.Window ( 0, OptionsRect, WindowFunction,"Settings Menu");
- }
- void WindowFunction ( int windowID )
- {
- // Все что должно быть в меню опции
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement