void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         CUIManager.Instance.show(UI_PAGE.POPUP_QUIT);
         CPopupQuit popup =
             CUIManager.Instance.get_uipage(UI_PAGE.POPUP_QUIT).GetComponent <CPopupQuit>();
         popup.refresh(() =>
         {
             CNetworkManager.Instance.disconnect();
         });
     }
 }
Esempio n. 2
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         CUIManager.Instance.show(UI_PAGE.POPUP_QUIT);
         CPopupQuit popup =
             CUIManager.Instance.get_uipage(UI_PAGE.POPUP_QUIT).GetComponent <CPopupQuit>();
         popup.refresh(() =>
         {
             if (Application.platform == RuntimePlatform.Android ||
                 Application.platform == RuntimePlatform.IPhonePlayer)
             {
                 Application.Quit();
             }
         });
     }
 }
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (CUIManager.Instance.get_uipage(UI_PAGE.GAME_RESULT).activeSelf)
            {
                CUIManager.Instance.get_uipage(UI_PAGE.GAME_RESULT).GetComponent <CPopupResult>().on_ok();
                return;
            }

            // 종료 팝업 출력.
            CUIManager.Instance.show(UI_PAGE.POPUP_QUIT);
            CPopupQuit popup =
                CUIManager.Instance.get_uipage(UI_PAGE.POPUP_QUIT).GetComponent <CPopupQuit>();
            popup.refresh(() =>
            {
                CNetworkManager.Instance.disconnect();
            });
        }
    }