Beispiel #1
0
 public bool ShowMenuPanel()
 {
     if (MenuPanel is null)
     {
         MenuPanel = Instantiate(Resources.Load <GameObject>(MenuPanelPath), MenuPanelRoot).GetComponent <MG_MenuPanel>();
         StartCoroutine(MenuPanel.OnEnter());
         return(true);
     }
     Debug.LogWarning("Show MG_MenuPanel Error : panel has show.");
     return(false);
 }
Beispiel #2
0
 public void ShowMenuPanel()
 {
     if (MenuPanel is null)
     {
         MenuPanel = Instantiate(Resources.Load <GameObject>(MenuPanelPath), MenuPanelRoot).GetComponent <MG_MenuPanel>();
         StartCoroutine(MenuPanel.OnEnter());
     }
     else
     {
         StartCoroutine(MenuPanel.OnEnter());
     }
 }
 public bool ShowMenuPanel(MG_GamePanelType startPanel)
 {
     if (MenuPanel is null)
     {
         MG_SaveManager.Current_GamePanel = (int)startPanel;
         MenuPanel = Instantiate(Resources.Load <GameObject>(MenuPanelPath), MenuPanelRoot).GetComponent <MG_MenuPanel>();
         StartCoroutine(MenuPanel.OnEnter());
         ShowGamePanel(startPanel);
         return(true);
     }
     Debug.LogWarning("Show MG_MenuPanel Error : panel has show.");
     return(false);
 }
Beispiel #4
0
        IEnumerator WaitUnLock()
        {
            MG_MenuPanel _MenuPanel = MG_UIManager.Instance.MenuPanel;

            while (true)
            {
                yield return(null);

                float remainingTime = _MenuPanel.freeWheeltimer;
                if (remainingTime > 0)
                {
                    int minutes = (int)(remainingTime / 60);
                    int seconds = (int)(remainingTime % 60);
                    text_locktime.text = (minutes > 9 ? minutes.ToString() : "0" + minutes) + ":" + (seconds > 9 ? seconds.ToString() : "0" + seconds);
                }
                else
                {
                    go_lock.SetActive(false);
                    btn_Speedup.gameObject.SetActive(true);
                    yield break;
                }
            }
        }