Exemplo n.º 1
0
        void Update()
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                if (!PlatformBase.sdkInterface.OnExit())
                {
                    MsgBoxPanel.ShowMsgBox(string.Empty, (string)ApplicationConst.dictStaticText["25"], 2, new MsgBoxPanel.MsgCallback(() => { ApplicationEntry.HandleExit(); }), null, "ExitGame");
                }
            }
#if UNITY_IOS || UNITY_ANDROID
            else if (ApplicationConst.bGM)
            {
                fCurZ = Input.acceleration.z;
                if (fCurZ > 0f)
                {
                    fTempZ = fCurZ - fLastZ;
                    fLastZ = fCurZ;
                    if (fTempZ > 0.8f && null != GMPanel.GetInst())
                    {
                        GMPanel.GetInst().OpenPanel();
                    }
                }
            }
#elif UNITY_STANDALONE
            else if (ApplicationConst.bGM && Input.GetKeyDown(KeyCode.F12))
            {
                if (null != GMPanel.GetInst())
                {
                    GMPanel.GetInst().BeShowWnd();
                }
            }
#endif
        }
Exemplo n.º 2
0
 private void Awake()
 {
     _inst       = this;
     _gameObject = gameObject;
     okBtn.onClick.AddListener(OnConfirm);
     fpsBtn.onClick.AddListener(ShowConsole);
     closeBtn.onClick.AddListener(ClosePanel);
     logoutBtn.onClick.AddListener(ToLoginPanel);
     _gameObject.SetActive(false);
 }
Exemplo n.º 3
0
 private void OnDestroy()
 {
     _inst = null;
 }