Esempio n. 1
0
        void InitializeSceneFailed()
        {
            EB.Debug.LogError("[CombatViewAction]InitializeSceneFailed: Fsm.ActiveStateName = {0}", GameFlowHotfixController.ActiveStateName);
            UI3DLobby[] lobbys = GameObjectExtension.FindMonoILRObjectsOfType <UI3DLobby>("Hotfix_LT.UI.UI3DLobby", "Hotfix_LT.UI.UI3DVsLobby");

            if (lobbys != null && lobbys.Length > 0)
            {
                for (var i = 0; i < lobbys.Length; i++)
                {
                    var lobby = lobbys[i];

                    if (lobby != null)
                    {
                        EB.Debug.LogWarning("CombatViewAction:SceneLoadFinished Clean lobby={0}", lobby);
                        GameObject.Destroy(lobby.mDMono.gameObject);
                    }
                }
            }

            UIStack.Instance.HideLoadingScreen();
            //Fsm.GotoPreviousState();
            FatalError(EB.Localizer.GetString("ID_FSM_SCENE_LOAD_FAILED"));
        }
Esempio n. 2
0
        IEnumerator InitializeSceneCoroutine(SceneRootEntry sceneRoot)
        {
            LoadingLogic.AddCustomProgress(10);
            EB.Debug.Log("LoginProfile {0}", ((float)((System.DateTime.UtcNow.Ticks / 10000) % 100000) / 1000));

            if (m_SceneRootEntry != null)
            {
                m_SceneRootEntry.ShowLevel();
            }

            while (!SceneLogic.MainHeroLoadComplete)
            {
                yield return(null);
            }
            LoadingLogic.AddCustomProgress(15);
            SetShadowQuality(sceneRoot);

            while (!HudLoadManager.Completed)
            {
                yield return(null);
            }

            UI3DLobby[] lobbys = GameObjectExtension.FindMonoILRObjectsOfType <UI3DLobby>("Hotfix_LT.UI.UI3DLobby", "Hotfix_LT.UI.UI3DVsLobby");

            if (lobbys != null)
            {
                if (lobbys != null && lobbys.Length > 0)
                {
                    for (var i = 0; i < lobbys.Length; i++)
                    {
                        var lobby = lobbys[i];

                        if (lobby != null)
                        {
                            EB.Debug.LogWarning("CombatViewAction: SceneLoadFinished Clean lobby = {0} ---> gameObject name: {1}", lobby, lobby.mDMono.name);
                            GameObject.Destroy(lobby.mDMono.gameObject);
                        }
                    }
                }
            }

            LTMainHudManager.Instance.SetsFromFirstBattleType(false);

            if (SceneLogic.BattleType == eBattleType.FirstBattle)
            {
                LTMainHudManager.Instance.SetsFromFirstBattleType(true);
                UIStack.Instance.HideLoadingScreenImmediately(false, false);
            }
            else if (SceneLogic.isPVP())
            {
                UIStack.Instance.WaitForOtherPlayer();
            }
            else
            {
                //UIStack.Instance.HideLoadingScreenImmediately(false, false);
            }


            GM.AssetManager.RecordLoadEnd("CombatViewAction", "HideLoadingScreen");

            LTCombatEventReceiver.Instance?.OnCombatViewLoaded();

            MainLandLogic.GetInstance().OnCombatViewLoaded();
            EB.Debug.Log("LoginProfile {0}", ((float)((System.DateTime.UtcNow.Ticks / 10000) % 100000) / 1000));
            EB.Debug.Log("To initialize scene.");
            LoadingLogic.AddCustomProgress(5);
        }