예제 #1
0
파일: Main.cs 프로젝트: linxscc/LoveGame
    private void ForceToLoginView(bool isShowSwitch = false)
    {
        //这下面的执行顺序不要轻易修改
        UnityWebRequest.ClearCookieCache();
        SdkHelper.AccountAgent.IsLogin = false;
        _backBtn.Hide();
        ClientData.CustomerSelectedLevel        = null;
        ClientData.CustomerSelectedCapsuleLevel = null;
        GuideManager.Reset();
        ClientTimer.Instance.Cleanup();
        NetWorkManager.CookieStr = null;
        NetWorkManager.InitHead();
        ModuleManager.Instance.DestroyAllModule();
        GlobalData.InitData();
        PopupManager.CloseAllWindow();
        SdkHelper.CustomServiceAgent.Reset();
        LoadingProgress.Instance.Show();

        if (isShowSwitch)
        {
            ModuleManager.Instance.EnterModule(ModuleConfig.MODULE_UPDATE, false, true, LoginCallbackType.Switch);
        }
        else
        {
            ModuleManager.Instance.EnterModule(ModuleConfig.MODULE_UPDATE);
        }
    }
예제 #2
0
파일: Main.cs 프로젝트: linxscc/LoveGame
    private void Update()
    {
        if (_enableBackKey)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                string ret = GalaSDKBaseFunction.ExitGame();
                Debug.LogError("GalaSDKBaseFunction.ExitGame:" + ret);
                if (ret == "false")
                {
                    DoExitPopup();
                }
            }
        }

#if UNITY_EDITOR
        if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.Return))
        {
            string url = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/ScreenCapture.png";
            Debug.LogError("ScreenCapture->" + url);
            ScreenCapture.CaptureScreenshot(url);
        }

        if (Input.GetKey(KeyCode.Space))
        {
            NetWorkManager.CookieStr = null;
            NetWorkManager.InitHead();
        }

        if (Input.GetKeyDown(KeyCode.F9))
        {
            AssetManager.Instance.LogMessage();
        }

        if (Input.GetKeyDown(KeyCode.Q))
        {
            SdkHelper.AccountAgent.OnLogout();
        }

        if (Input.GetKey(KeyCode.LeftControl) && Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.M))
        {
            AssetManager.Instance.GetBundleTotalMemory();
        }
#endif
    }