Ejemplo n.º 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);
        }
    }