Example #1
0
    public override bool Open()
    {
        if (isFading)
        {
            return(false);
        }
        else
        {
            canvasObject.SetActive(true);
            buttonSelector.ForceSelect();
            buttonSelector.StaySelect();

            if (onMainMenu)
            {
                if (uiMainMenu == null)
                {
                    UIBase tempUI;
                    UIManager.Instance.uiDicitonary.TryGetValue(eUItype.MAIN, out tempUI);
                    uiMainMenu = tempUI as UIMainMenu;
                }
                uiMainMenu.Close();
            }
            else if (onPause)
            {
                if (uiPause == null)
                {
                    UIBase tempUI;
                    UIManager.Instance.uiDicitonary.TryGetValue(eUItype.PAUSE, out tempUI);
                    uiPause = tempUI as UIPause;
                }
                uiPause.CloseMenu();
            }


            StartCoroutine(ProcessFadeAlpha_Open());
            return(true);
        }
    }
Example #2
0
    public override bool Open()
    {
        if (isFading)
        {
            return(false);
        }
        else
        {
            canvasObject.SetActive(true);
            buttonSelector.ForceSelect();
            if (onMainMenu)
            {
                uiMainMenu.Close();
            }
            else if (onPause)
            {
                uiPause.CloseMenu();
            }

            UpdateValue(originalSettingsData);
            StartCoroutine(ProcessFadeAlpha_Open());
            return(true);
        }
    }