Exemple #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);
        }
    }
Exemple #2
0
    public override bool Open()
    {
        if (isFading)
        {
            return(false);
        }
        else
        {
            menuGroup.alpha = 1f;
            Time.timeScale  = 0f;

            canvasObject.SetActive(true);
            menuGroup.interactable = true;
            audioTime = AudioManager.Instance.audioSource_bgm.time;
            AudioManager.Instance.audioSource_bgm.Stop();

            AudioManager.Instance.Play_UI_Pause_On();
            buttonSelector.ForceSelect();

            StartCoroutine(ProcessFadeAlpha_Open());
            return(true);
        }
    }
    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);
        }
    }