void CheckReconnection(string sceneName) { if (ScenePreloader.Instance.isPreLoading) { Debug.Log("CheckReconnection : ScenePreloader.Instance.isPreLoading"); return; } StageMgr.OnSceneLoaded -= CheckReconnection; GlobalInstanceFunction.Instance.Invoke(() => { //if(AppPauseBeforeScene.Equals(StageMgr.Scene_name)) // return; if (!Application.loadedLevelName.Equals("LoginScene") && !Application.loadedLevelName.Equals("ReturnScene")) { if (NetConnection.Instance.IsShutDown) { Debug.Log("SocketHandler"); SocketHandler(555666); } else { if (AppPauseBeforeScene.Equals(StageMgr.Scene_name) && GlobalValue.isFBScene(StageMgr.Scene_name)) { return; } bool needSync = NetConnection.Instance.discard() || (isLoadingScene && GlobalValue.isBattleScene(StageMgr.Scene_name)); if (needSync) { //NetConnection.Instance.discard(); Debug.Log("requestPhoto"); ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("dataSyncing")); GameManager.Instance.ClearCurrentState(); NetConnection.Instance.requestPhoto(); } } } }, 1); }
public static void LoadSceneUI(string uiName, UIFactory.SceneUICallBack callback) { if (GlobalValue.isFBScene(uiName)) { UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_MainPanel, callback); } //else if (uiName == GlobalValue.StageName_piantoudonghuaf) //{ // UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_EmptyPanel, callback); //} else if (uiName == GlobalValue.StageName_groupScene) { //TeamUIPanel.SwithShowMe(); //UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_TeamPanel, callback); } else if (uiName == GlobalValue.StageName_CreateRoleScene) { UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_PanelXuan, callback); } else if (uiName == GlobalValue.StageName_ReLoginScene) { UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_LoginPanel, callback); } else if (GlobalValue.isBattleScene(uiName)) { UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_AttackPanel, callback); } else if (!string.IsNullOrEmpty(uiName)) { //UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_PrebattlePanel, callback); UIFactory.Instance.LoadUIPanel(UIASSETS_ID.UIASSETS_MainPanel, callback); } else { if (callback != null) { callback(); } } }