Example #1
0
    /*
     *	FUNCTION:	Enable the menu to show.
     */
    public void ShowMenu(NGUIMenus menu)
    {
        CurrentMenu = menu;                                //set the currently active menu
        NGUITools.SetActive(goNGUIMenus[(int)menu], true); //enable the menu
        NGUITools.SetActive(goHUDGroup, false);            //disable the HUD components

        //update the currency on the shop home menu header
        if (menu == NGUIMenus.ShopHome || menu == NGUIMenus.ShopCostumes ||
            menu == NGUIMenus.ShopIAPs || menu == NGUIMenus.ShopPowerups ||
            menu == NGUIMenus.ShopUtilities)
        {
            updateCurrencyOnHeader(menu);
        }
    }
Example #2
0
 /*
  *	FUNCTION: Disable the menu to close
  */
 public void CloseMenu(NGUIMenus menu)
 {
     NGUITools.SetActive(goNGUIMenus[(int)menu], false);        //disable the menu
 }
Example #3
0
 /*
  * FUNCTION:	Updates the value of the currency on the header. This
  *              header item is located at all shop menus.
  * */
 public void updateCurrencyOnHeader(NGUIMenus menu)
 {
     ((UILabel)goNGUIMenus[(int)menu].transform.Find("Text_Currency").GetComponent(typeof(UILabel)))
     .text = hInGameScriptCS.getCurrencyCount().ToString();
 }