Exemplo n.º 1
0
 public void EraseProgress()
 {
     PlayerPrefs.DeleteAll();
     menuFunction = mainMenu;
     //go back to main menu
     MainMenuScreen();
 }
    // Use this for initialization
    void Start()
    {
        screenHeight = Screen.height;
        screenWidth = Screen.width;

        menuFunction = anyKey;
    }
Exemplo n.º 3
0
 void AssemblyCSharp.IInputObserver.notify(UnityEngine.KeyCode pressedKey)
 {
     if (pressedKey == KeyCode.Escape) {
                     menuFunction = mainMenuWithResume;
                     //mHighScoresCache = mUnityTetris.GetCurrentHighScores ().Take (5).ToList ();
                     NotifyObservers (AssemblyCSharp.GameState.Paused);
             }
 }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        menuFunction = SPLevelSelectMenu;// AnyKeyMenu;

        //On Win, Generate new Level
        _gameController.ON_GAME_WIN.AddListener(() => { InitNewGame(GenerateRandomSeed()); });
        _gameController.ON_QUIT.AddListener(OnGameQuit);
    }
Exemplo n.º 5
0
    void anyKey()
    {
        if(Input.anyKey){
            menuFunction = mainMenu;
        }

        GUI.skin.label.alignment = TextAnchor.MiddleCenter;
        GUI.Label(new Rect(screenWidth*0.45f, screenHeight*0.45f,screenWidth*0.1f,screenHeight*0.1f),"Press any key to continue");
    }
Exemplo n.º 6
0
        public static void Main()
        {
            Console.WriteLine("Interface Menu, Press any key to Continue:");
            Console.ReadLine();

            MenuInterface interfaceMenu = new MenuInterface(2);

            interfaceMenu.MainMenu.Text                          = "Main";
            interfaceMenu.MainMenu.SubMenu[0]                    = new MenuItemInterface(2, 1);
            interfaceMenu.MainMenu.SubMenu[0].Text               = "Show Date/ Time";
            interfaceMenu.MainMenu.SubMenu[0].SubMenu[0]         = new MenuItemInterface(0, 2);
            interfaceMenu.MainMenu.SubMenu[0].SubMenu[0].Text    = "Show Time";
            interfaceMenu.MainMenu.SubMenu[0].SubMenu[0].Invoker = new Time();
            interfaceMenu.MainMenu.SubMenu[0].SubMenu[1]         = new MenuItemInterface(0, 2);
            interfaceMenu.MainMenu.SubMenu[0].SubMenu[1].Text    = "Show Date";
            interfaceMenu.MainMenu.SubMenu[0].SubMenu[1].Invoker = new Date();

            interfaceMenu.MainMenu.SubMenu[1]                    = new MenuItemInterface(2, 1);
            interfaceMenu.MainMenu.SubMenu[1].Text               = "Version/ Count digits";
            interfaceMenu.MainMenu.SubMenu[1].SubMenu[0]         = new MenuItemInterface(0, 2);
            interfaceMenu.MainMenu.SubMenu[1].SubMenu[0].Text    = "Version";
            interfaceMenu.MainMenu.SubMenu[1].SubMenu[0].Invoker = new Version();
            interfaceMenu.MainMenu.SubMenu[1].SubMenu[1]         = new MenuItemInterface(0, 2);
            interfaceMenu.MainMenu.SubMenu[1].SubMenu[1].Text    = "Count Digits";
            interfaceMenu.MainMenu.SubMenu[1].SubMenu[1].Invoker = new CountDig();
            interfaceMenu.Show();

            Console.Clear();
            Console.WriteLine("Delegate Menu, Press any key to Continue:");
            Console.ReadLine();

            MenuDelegate delegateMenu = new MenuDelegate(2);

            delegateMenu.MainMenu.Text                           = "Main";
            delegateMenu.MainMenu.SubMenu[0]                     = new MenuItemDelegate(2, 1);
            delegateMenu.MainMenu.SubMenu[0].Text                = "Show Date/ Time";
            delegateMenu.MainMenu.SubMenu[0].SubMenu[0]          = new MenuItemDelegate(0, 2);
            delegateMenu.MainMenu.SubMenu[0].SubMenu[0].Text     = "Show Time";
            delegateMenu.MainMenu.SubMenu[0].SubMenu[0].Choosed += Time.ShowTime;
            delegateMenu.MainMenu.SubMenu[0].SubMenu[1]          = new MenuItemDelegate(0, 2);
            delegateMenu.MainMenu.SubMenu[0].SubMenu[1].Text     = "Show Date";
            delegateMenu.MainMenu.SubMenu[0].SubMenu[1].Choosed += Date.ShowDate;

            delegateMenu.MainMenu.SubMenu[1]                     = new MenuItemDelegate(2, 1);
            delegateMenu.MainMenu.SubMenu[1].Text                = "Version/ Count digits";
            delegateMenu.MainMenu.SubMenu[1].SubMenu[0]          = new MenuItemDelegate(0, 2);
            delegateMenu.MainMenu.SubMenu[1].SubMenu[0].Text     = "Version";
            delegateMenu.MainMenu.SubMenu[1].SubMenu[0].Choosed += Version.PrintVersion;
            delegateMenu.MainMenu.SubMenu[1].SubMenu[1]          = new MenuItemDelegate(0, 2);
            delegateMenu.MainMenu.SubMenu[1].SubMenu[1].Text     = "Count Digits";
            delegateMenu.MainMenu.SubMenu[1].SubMenu[1].Choosed += CountDig.DigCount;
            delegateMenu.Show();

            Console.Clear();
            Console.WriteLine("Bye Bye");
        }
    // Use this for initialization
    void Start()
    {
        screenHeight = Screen.height;
        screenWidth  = Screen.width;

        buttonHeight = screenHeight * 0.3f;
        buttonWidth  = screenWidth * 0.4f;

        menuFunction = anyKey;
    }
Exemplo n.º 8
0
    // Use this for initialization
    void Start()
    {
        screenHeight = Screen.height;
        screenWidth = Screen.width;

        buttonHeight = screenHeight * 0.3f;
        buttonWidth = screenWidth * 0.4f;

        menuFunction = anyKey;
    }
Exemplo n.º 9
0
    // Use this for initialization
    void Start()
    {
        screenHeight = Screen.height;
                screenWidth = Screen.width;

                buttonHeight = screenHeight * 0.3f;
                buttonWidth = screenWidth * 0.4f;

                //here we set the menuFunction to point to the anyKey function, which is further down in the code
                menuFunction = anyKey;
    }
Exemplo n.º 10
0
    void anyKey()
    {
        if (Input.anyKey)
        {
            menuFunction = mainMenu;
        }

        GUI.skin.label.alignment = TextAnchor.MiddleCenter;

        GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.45f, screenWidth * 0.1f, screenHeight * 0.1f), "Press any key to continue");
    }
Exemplo n.º 11
0
	void Start ()
	{
		screenHeight = Screen.height;
		screenWidth = Screen.width;
		
		buttonHeight = screenHeight * 0.3f;
		buttonHeight1 = screenHeight * 0.15f;
		buttonWidth = screenWidth * 0.4f;
		buttonWidth1 = screenWidth * 0.2f;

		menuFunction = difficultyMenu;
	}
Exemplo n.º 12
0
    void Start()
    {
        screenHeight = Screen.height;
        screenWidth  = Screen.width;

        buttonHeight  = screenHeight * 0.3f;
        buttonHeight1 = screenHeight * 0.15f;
        buttonWidth   = screenWidth * 0.4f;
        buttonWidth1  = screenWidth * 0.2f;

        menuFunction = difficultyMenu;
    }
Exemplo n.º 13
0
    //in order to change the GUI we just change the function that menuFunction points to. It will basically take care of itself from that point.
    void anyKey()
    {
        //check if the user pressed anything, if it did, change the menuFunction to show the main menu
                if(Input.anyKey)
                {
                        menuFunction = mainMenu;
                }

                //this is just text in the center of the screen telling the user to press any key
                GUI.skin.label.alignment = TextAnchor.MiddleCenter;
                GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.45f, screenWidth * 0.1f, screenHeight * 0.1f), "Press any key to continue");
    }
    void anyKey()
    {
        if (Input.anyKey)
        {
            menuFunction = mainMenu;
        }

        //Sets GUI to be placed in the middle.
        GUI.skin.label.alignment = TextAnchor.MiddleCenter;

        GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.45f, screenWidth * 0.1f, screenHeight * 0.1f), "PRESS ANY KEY TO CONTINUE");
    }
Exemplo n.º 15
0
 void anyKey()
 {
     if (Input.anyKey)
     {
         menuFunction = mainMenu;
     }
     GUI.skin = skin1;
     GUI.skin.label.alignment = TextAnchor.MiddleCenter;
     GUI.Label(new Rect(screenWidth * 0.25f, screenHeight * 0.45f, screenWidth * 0.5f, screenHeight * 0.5f), "Press any key to continue...");
     menuState = "anykey";
     Debug.Log("in anykey");
 }
Exemplo n.º 16
0
        public void Add(string str, MenuDelegate d)
        {
            MenuItem item = items.Find(x => x.MenuString == str);

            if (item == null)
            {
                items.Add(new MenuItem(str, d));
            }
            else
            {
                item.action += d;
            }
        }
Exemplo n.º 17
0
    void AnyKeyMenu()
    {
        int screenWidth  = Screen.width;
        int screenHeight = Screen.height;

        if (Input.anyKey)
        {
            menuFunction = GameTypeMenu;
        }

        GUI.skin.label.alignment = TextAnchor.MiddleCenter;
        GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.45f, screenWidth * 0.1f, screenHeight * 0.1f), "Press Any Key To Continue");
    }
Exemplo n.º 18
0
    //in order to change the GUI we just change the function that menuFunction points to. It will basically take care of itself from that point.
    /*void anyKey()
    {
        //check if the user pressed anything, if it did, change the menuFunction to show the main menu
        if(Input.anyKey)
        {
            menuFunction = mainMenu;
        }
        //this is just text in the center of the screen telling the user to press any key

        GUI.skin.label.alignment = TextAnchor.MiddleCenter;
        GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.45f, screenWidth * 0.1f, screenHeight * 0.1f), "Press any key to continue");
    }*/
    //mainMenu only has two buttons in the version, one to play the game, and one to quit the game
    void mainMenu()
    {
        if(GUI.Button(new Rect((ScreenWidth-ButtonWidth)*0.05f, ScreenHeight*0.3f, ButtonWidth, ButtonHeight), "Start Game"))
        {
            menuFunction = levelSelect;
        }
        //if(GUI.Button(new Rect((ScreenWidth-ButtonWidth)*0.05f, ScreenHeight*0.65f, ButtonWidth, ButtonHeight), "Options"))
        //{
        //}
        if(GUI.Button(new Rect((ScreenWidth-ButtonWidth)*0.05f, ScreenHeight*0.45f, ButtonWidth, ButtonHeight), "Quit Game"))
        {
            Application.Quit();
        }
    }
Exemplo n.º 19
0
 void levelSelect()
 {
     if(GUI.Button(new Rect((ScreenWidth-ButtonWidth)*0.05f, ScreenHeight*0.3f, ButtonWidth, ButtonHeight), "Level 1"))
     {
         Application.LoadLevel("Level1");
     }
     if(GUI.Button(new Rect((ScreenWidth-ButtonWidth)*0.05f, ScreenHeight*0.45f, ButtonWidth, ButtonHeight), "Level 2"))
     {
         Application.LoadLevel("Level2");
     }
     if(GUI.Button(new Rect((ScreenWidth-ButtonWidth)*0.05f, ScreenHeight*0.6f, ButtonWidth, ButtonHeight), "Back"))
     {
         menuFunction = mainMenu;
     }
 }
Exemplo n.º 20
0
 void difficultyMenu()
 {
     if (GUI.Button(new Rect((screenWidth - buttonWidth1) * 0.2f, screenHeight * 0.4f, buttonWidth1, buttonHeight1), "Easy"))
     {
         difficulty = 1;
         //Debug.LogError("ERROR: difficulty set to 1");
         menuFunction = realMenu;
     }
     if (GUI.Button(new Rect((screenWidth - buttonWidth1) * 0.5f, screenHeight * 0.4f, buttonWidth1, buttonHeight1), "Medium"))
     {
         difficulty   = 2;
         menuFunction = realMenu;
     }
     if (GUI.Button(new Rect((screenWidth - buttonWidth1) * 0.8f, screenHeight * 0.4f, buttonWidth1, buttonHeight1), "Hard"))
     {
         difficulty   = 3;
         menuFunction = realMenu;
     }
 }
Exemplo n.º 21
0
	void Start() {
		screenHeight = Screen.height;
		screenWidth = Screen.width;
		
		buttonHeight = screenHeight * 0.15f;
		buttonWidth = screenWidth * 0.4f;
		menuFunction = mainMenu;

		gameStateObject = GameObject.Find ("Game State Object");
		if (gameStateObject == null) {
			Debug.LogError ("Could not find game state object", gameStateObject);
			return;
		}
		
		gameState = (GameState) gameStateObject.GetComponent(typeof(GameState));
		if (gameState == null) {
			Debug.LogError ("Could not find lives left script", gameState);
			return;
		}
	}
Exemplo n.º 22
0
    void GameTypeMenu()
    {
        int   screenWidth  = Screen.width;
        int   screenHeight = Screen.height;
        float buttonWidth  = screenWidth * 0.4f;
        float buttonHeight = screenHeight * 0.3f;

        if (GUI.Button(new Rect((screenWidth - buttonWidth) * 0.5f, screenHeight * 0.1f, buttonWidth, buttonHeight), "Single Player"))
        {
            menuFunction = SPLevelSelectMenu;
        }

        if (GUI.Button(new Rect((screenWidth - buttonWidth) * 0.5f, screenHeight * 0.1f + buttonHeight, buttonWidth, buttonHeight), "Multi Player"))
        {
            menuFunction = MPInitLobbyMenu;
        }

        if (GUI.Button(new Rect((screenWidth - buttonWidth) * 0.5f, screenHeight * 0.1f + (buttonHeight * 2.0f), buttonWidth, buttonHeight), "Quit Game"))
        {
            Application.Quit();
        }
    }
Exemplo n.º 23
0
        public Wheel(ScreenManager screenManager, MenuDelegate menuDelegate, World world, float radius, Vector2 centerPosition, String[] entryStrings, Sprite background)
        {
            this.menuDelegate = menuDelegate;
            this.radius = radius;
            this.entries = new Dictionary<int,String>(entryStrings.Length);
            for(int i=0;i<entryStrings.Length;i++){
                this.entries.Add(i, entryStrings[i]);
            }
            this.world = world;
            this.screenManager = screenManager;
            wheelBody = BodyFactory.CreateCircle(world, radius, 1f);
            wheelBody.BodyType = BodyType.Dynamic;
            wheelBody.Restitution = .7f;
            wheelBody.Friction = .2f;

            FixedRevoluteJoint rollingJoint = JointFactory.CreateFixedRevoluteJoint(world, wheelBody, Vector2.Zero, Vector2.Zero);
            wheelSprite = new Sprite(screenManager.Content.Load<Texture2D>("wheel-5"));

            jointTexture = screenManager.Content.Load<Texture2D>("joint");
            this.background = background;
            phone = new Sprite(screenManager.Content.Load<Texture2D>("phone"));
        }
Exemplo n.º 24
0
    void Start()
    {
        screenHeight = Screen.height;
        screenWidth  = Screen.width;

        buttonHeight = screenHeight * 0.15f;
        buttonWidth  = screenWidth * 0.4f;
        menuFunction = mainMenu;

        gameStateObject = GameObject.Find("Game State Object");
        if (gameStateObject == null)
        {
            Debug.LogError("Could not find game state object", gameStateObject);
            return;
        }

        gameState = (GameState)gameStateObject.GetComponent(typeof(GameState));
        if (gameState == null)
        {
            Debug.LogError("Could not find lives left script", gameState);
            return;
        }
    }
Exemplo n.º 25
0
    // Use this for initialization
    void Start()
    {
        mainMenuPanel     = transform.FindChild("OpeningMenu").gameObject;
        levelSelectPanel  = transform.FindChild("PickALevel").gameObject;
        eraseProgessPanel = transform.FindChild("EraseProgress").gameObject;
        controlsPanel     = transform.FindChild("Controls").gameObject;
        //this will set the start screen as main menu
        MainMenuScreen();



        screenHeight = Screen.height;
        screenWidth  = Screen.width;
        buttonHeight = screenHeight * 0.15f;
        buttonWidth  = screenWidth * 0.4f;

        menuFunction = mainMenu;


        //levelButtons = new Transform[] {  level2button, level3button,level4button, level5button, level6button};

        LockLevels(levelButtons);
    }
Exemplo n.º 26
0
 void anyKey()
 {
     if (Input.anyKey)
     {
         menuFunction = mainMenu;
     }
     GUI.skin.label.alignment = TextAnchor.MiddleCenter;
     style.fontSize           = 44;
     style1.fontSize          = 34;
     style2.fontSize          = 24;
     style3.fontSize          = 24;
     style.normal.textColor   = Color.red;
     style1.normal.textColor  = Color.red;
     style2.normal.textColor  = Color.blue;
     style3.normal.textColor  = Color.red;
     style.alignment          = TextAnchor.MiddleCenter;
     style1.alignment         = TextAnchor.MiddleCenter;
     style2.alignment         = TextAnchor.MiddleCenter;
     style3.alignment         = TextAnchor.MiddleCenter;
     GUI.Label(new Rect(Screen.width / 2 - 300, Screen.height / 2 - 20, 600, 40), "HUNGRY MAN!", style);
     GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.55f, screenWidth * 0.1f, screenHeight * 0.1f), "Press Any Key to Continue!", style1);
     GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.75f, screenWidth * 0.1f, screenHeight * 0.1f), "<Use Arrow Keys to Play Game>", style2);
     GUI.Label(new Rect(screenWidth * 0.45f, screenHeight * 0.65f, screenWidth * 0.1f, screenHeight * 0.1f), "\"Eating broccoli's will cause death!\"", style3);
 }
Exemplo n.º 27
0
	void difficultyMenu()
	{

		if(GUI.Button(new Rect((screenWidth - buttonWidth1) * 0.2f, screenHeight * 0.4f, buttonWidth1, buttonHeight1), "Easy"))
		{
			difficulty = 1;
			//Debug.LogError("ERROR: difficulty set to 1");
			menuFunction = realMenu;

		}
		if(GUI.Button(new Rect((screenWidth - buttonWidth1) * 0.5f, screenHeight* 0.4f, buttonWidth1, buttonHeight1), "Medium"))
		{
			difficulty = 2;
			menuFunction = realMenu;
		}
		if(GUI.Button(new Rect((screenWidth - buttonWidth1) * 0.8f, screenHeight * 0.4f, buttonWidth1, buttonHeight1), "Hard"))
		{
			difficulty = 3;
			menuFunction = realMenu;
		}
		


	}
Exemplo n.º 28
0
 void AssemblyCSharp.IClassicTetrisStateObserver.notify(AssemblyCSharp.ClassicTetrisStateUpdate stateUpdate)
 {
     if (stateUpdate == AssemblyCSharp.ClassicTetrisStateUpdate.GameEnded) {
                     menuFunction = mainMenu;
             }
 }
Exemplo n.º 29
0
    // Use this for initialization
    void Start()
    {
        ScreenHeight = Screen.height;
        ScreenWidth = Screen.width;

        ButtonHeight = ScreenHeight / 10;
        ButtonWidth = ScreenWidth / 3;

        //here we set the menuFunction to point to the anyKey function, which is further down in the code
        menuFunction = mainMenu;
    }
Exemplo n.º 30
0
 public void Enable(string message, string option1, string option2, MenuDelegate confirm, MenuDelegate decline) => enableMethod(ConfirmationMenu, message, option1, option2, confirm, decline);
Exemplo n.º 31
0
    private void mainMenuWithResume()
    {
        if (GUI.Button (new Rect ((mScreenWidth - mButtonWidth) * 0.5f, mScreenHeight * 0.1f,
                                  mButtonWidth, mButtonHeight), "Continue Game")) {
                        menuFunction = inGameHUD;
                        NotifyObservers (AssemblyCSharp.GameState.Running);
                }
                if (GUI.Button (new Rect ((mScreenWidth - mButtonWidth) * 0.5f, mScreenHeight * 0.4f,
                                  mButtonWidth, mButtonHeight), "Start New Game")) {
                        menuFunction = inGameHUD;
                        NotifyObservers (AssemblyCSharp.GameState.Ended);
                        NotifyObservers (AssemblyCSharp.GameState.Running);
                }
                if (GUI.Button (new Rect ((mScreenWidth - mButtonWidth) * 0.5f, mScreenHeight * 0.7f,
                                  mButtonWidth, mButtonHeight), "Quit Game")) {
                        Application.Quit ();
                }

                AddBlockCount ();
                AddLeaderboard ();
    }
Exemplo n.º 32
0
Arquivo: Menu.cs Projeto: rango84/Run
 public void AddLeftActiveFunctionalityToControl(String name, MenuDelegate del)
 {
     Controls[name].SetLeftDelegate(del);
 }
Exemplo n.º 33
0
Arquivo: Menu.cs Projeto: rango84/Run
 public void AddCancel(MenuDelegate can)
 {
     Cancel = can;
 }
Exemplo n.º 34
0
 public void SetLeftDelegate(MenuDelegate left)
 {
     LeftPress = left;
 }
Exemplo n.º 35
0
    // Use this for initialization
    private void Start()
    {
        mScreenHeight = Screen.height;
                mScreenWidth = Screen.width;

                mButtonHeight = mScreenHeight * 0.2f;
                mButtonWidth = mScreenWidth * 0.4f;

                menuFunction = mainMenu;

                //Register with the input controller so I observer updates
                GameObject go = GameObject.Find ("GameObject");
                AssemblyCSharp.PlayerControl inputController = (AssemblyCSharp.PlayerControl)go.GetComponent (typeof(AssemblyCSharp.PlayerControl));
                inputController.RegisterObserver (this);
                mUnityTetris = (AssemblyCSharp.UnityTetris)go.GetComponent (typeof(AssemblyCSharp.UnityTetris));
    }
Exemplo n.º 36
0
 public MenuItem(string str, MenuDelegate d)
 {
     MenuString = str;
     action    += d;
 }
Exemplo n.º 37
0
        public MDMenu(CommandManager manager, CommandEntrySet ces, CommandSource commandSource, object initialCommandTarget, EventHandler closeHandler)
        {
            Delegate = new MenuDelegate(closeHandler);

            AutoEnablesItems = false;

            var label = ces.Name ?? "";

            Title = ContextMenuItem.SanitizeMnemonics(label);
            foreach (CommandEntry ce in ces)
            {
                if (ce.CommandId == Command.Separator)
                {
                    AddItem(NSMenuItem.SeparatorItem);
                    if (!string.IsNullOrEmpty(ce.OverrideLabel))
                    {
                        AddItem(new MDMenuHeaderItem(ce));
                    }
                    continue;
                }

                if (string.Equals(ce.CommandId as string, servicesID, StringComparison.Ordinal))
                {
                    AddItem(new MDServicesMenuItem());
                    continue;
                }

                var subset = ce as CommandEntrySet;
                if (subset != null)
                {
                    AddItem(new MDSubMenuItem(manager, subset, commandSource, initialCommandTarget));
                    continue;
                }

                var lce = ce as LinkCommandEntry;
                if (lce != null)
                {
                    AddItem(new MDLinkMenuItem(lce));
                    continue;
                }

                Command cmd = ce.GetCommand(manager);
                if (cmd == null)
                {
                    LoggingService.LogError("MacMenu: '{0}' maps to null command", ce.CommandId);
                    continue;
                }

                if (cmd is CustomCommand)
                {
                    LoggingService.LogWarning("MacMenu: '{0}' is unsupported custom-rendered command' '", ce.CommandId);
                    continue;
                }

                var acmd = cmd as ActionCommand;
                if (acmd == null)
                {
                    LoggingService.LogWarning("MacMenu: '{0}' has unknown command type '{1}'", cmd.GetType(), ce.CommandId);
                    continue;
                }

                AddItem(new MDMenuItem(manager, ce, acmd, commandSource, initialCommandTarget));
            }
        }
Exemplo n.º 38
0
 public Menu(String menuName, MenuDelegate menuDelegate)
 {
     this.menuName = menuName;
     del           = menuDelegate;
 }
Exemplo n.º 39
0
 public void SetRightDelegate(MenuDelegate right)
 {
     RightPress = right;
 }
Exemplo n.º 40
0
Arquivo: Menu.cs Projeto: rango84/Run
 public void AddReach(MenuDelegate reach)
 {
     ReachDestination = reach;
 }
Exemplo n.º 41
0
Arquivo: Menu.cs Projeto: rango84/Run
 public void AddUpdateMethod(MenuDelegate init)
 {
     UpdateMethod = init;
 }
Exemplo n.º 42
0
 public void SetActivateDelegate(MenuDelegate del)
 {
     Activate = del;
 }
Exemplo n.º 43
0
Arquivo: Menu.cs Projeto: rango84/Run
 public void AddUnreach(MenuDelegate unReach)
 {
     UnReachDestination = unReach;
 }
Exemplo n.º 44
0
 public MenuItem(string command, string desc, MenuDelegate callback)
 {
     Command     = command;
     Description = desc;
     Callback    = callback;
 }
Exemplo n.º 45
0
 private void mainMenu()
 {
     if (GUI.Button (new Rect ((mScreenWidth - mButtonWidth) * 0.5f, mScreenHeight * 0.25f,
                                                          mButtonWidth, mButtonHeight), "Start New Game")) {
                     //make sure to kick off new game
                     menuFunction = inGameHUD;
                     NotifyObservers (AssemblyCSharp.GameState.Ended);
                     NotifyObservers (AssemblyCSharp.GameState.Running);
             }
             if (GUI.Button (new Rect ((mScreenWidth - mButtonWidth) * 0.5f, mScreenHeight * 0.5f,
                             mButtonWidth, mButtonHeight), "Quit Game")) {
                     Application.Quit ();
             }
             mUnityTetris.Scene.RegisterObserver (this);
             AddLeaderboard ();
 }