Example #1
0
 /*
  *	FUNCTION: Handle clicks on Game over menu.
  */
 private void handlerGameOverMenu(Transform buttonTransform)
 {
     if (tGameOverButtons[0] == buttonTransform)        //main menu button
     {
         hInGameScriptCS.procesClicksDeathMenu(GameOverMenuEvents.Back);
         CloseMenu((int)MenuIDs.GameOverMenu);
         ShowMenu((int)MenuIDs.MainMenu);
     }
     else if (tGameOverButtons[1] == buttonTransform)        //play button
     {
         hInGameScriptCS.procesClicksDeathMenu(GameOverMenuEvents.Play);
         CloseMenu(CurrentMenu);
     }
 }
Example #2
0
 void OnClick()
 {
     if (hNGUIMenuScript.getCurrentMenu() == NGUIMenuScript.NGUIMenus.GameOverMenu)        //if this is GameOver menu
     {
         hInGameScriptCS.procesClicksDeathMenu(MenuScriptCS.GameOverMenuEvents.Back);
     }
     else if (hNGUIMenuScript.getCurrentMenu() == NGUIMenuScript.NGUIMenus.PauseMenu)        //if this is Pause menu
     {
         hInGameScriptCS.processClicksPauseMenu(MenuScriptCS.PauseMenuEvents.MainMenu);
     }
     else if (hNGUIMenuScript.getCurrentMenu() == NGUIMenuScript.NGUIMenus.ShopCostumes ||     //if Shop Costumes menu is active
              hNGUIMenuScript.getCurrentMenu() == NGUIMenuScript.NGUIMenus.ShopIAPs ||       //if Shop IAPs menu is active
              hNGUIMenuScript.getCurrentMenu() == NGUIMenuScript.NGUIMenus.ShopPowerups ||       //if Shop Powerups menu is active
              hNGUIMenuScript.getCurrentMenu() == NGUIMenuScript.NGUIMenus.ShopUtilities) //if Shop Utilities menu is active
     {
         hNGUIMenuScript.ShowMenu(NGUIMenuScript.NGUIMenus.ShopHome);                     //show the Shop Home menu
         NGUITools.SetActive(this.transform.parent.gameObject, false);                    //hide the current menu
     }
     else
     {
         hNGUIMenuScript.ShowMenu(NGUIMenuScript.NGUIMenus.MainMenu);  //show the main menu
         NGUITools.SetActive(this.transform.parent.gameObject, false); //hide the current menu
     }                                                                 //end of else
 }                                                                     //end of OnClick function