示例#1
0
        private IEnumerator WaitForReady()
        {
            DateTime t = DateTime.Now;

            EB.Debug.Log("WaitForReady=====>_{0}", t.ToString("yyyy-MM-dd hh:mm:ss fff"));
            while (!HudLoadManager.IsReady)
            {
                if (!HudLoadManager.IsLoadingConfig)
                {
                    HudLoadManager.LoadConfigAsync();
                }
                yield return(null);
            }
            LoadingLogic.AddCustomProgress(5);
            while (!SceneLoadManager.IsReady)
            {
                if (!SceneLoadManager.IsLoadingConfig)
                {
                    SceneLoadManager.LoadConfigAsync();
                }
                yield return(null);
            }
            LoadingLogic.AddCustomProgress(5);

            Mgr.SetGameState <GameStateLoadGame>();

            t = DateTime.Now;
            EB.Debug.Log("<=====WaitForReady_{0}", t.ToString("yyyy-MM-dd hh:mm:ss fff"));
        }
示例#2
0
        protected virtual void HudLoadComplete(bool NoError, string[] Show)
        {
            if (Show != null)
            {
                StringBuilder str = new StringBuilder();
                for (int i = 0; i < Show.Length; ++i)
                {
                    str.Append("[" + i + "]:" + Show[i]);

                    HudRootEntry entry = HudLoadManager.GetHudRoot(Show[i]);
                    entry.Show();
                    UIHierarchyHelper.Instance.Place(entry.m_Root, UIHierarchyHelper.eUIType.HUD_Dynamic, UIAnchor.Side.Center);
                }
                EB.Debug.LogUI("【<color=#00ff00>{0}</color>】加载UI界面:<color=#00ff00>{1}</color>: result = <color=#00ff00>{2}</color>", GameFlowHotfixController.ActiveStateName, str, NoError);
            }
            else
            {
                EB.Debug.LogError(string.Format("[{0}]HudLoadComplete: There is nothing to show.", GameFlowHotfixController.ActiveStateName));
            }

            if (onLoadComplete != null)
            {
                onLoadComplete(NoError);
                onLoadComplete = null;
            }
        }
示例#3
0
        public override void End()
        {
            SparxHub.Instance.PushManager.OnScheduleLocalNotification -= ScheduleLocalNotification;
            SparxHub.Instance.ChatManager.OnConnected -= RegisterChatChannels;

            DestroyFlowControlObject();

            HudLoadManager.DestroyAllHud();
            SceneLoadManager.DestroyAllLevel();
            PlayerManagerForFilter.Dispose();
            NpcManager.Dispose();
            MainLandLogic.Dispose();
            CombatLogic.Dispose();
            InputBlockerManager.Instance.ForceUnlockAll();
            LoadingSpinner.Destroy();
            FusionAudio.StopMusic();
            FusionAudio.StopAmbience();
            ChatController.instance.Clean();
        }
示例#4
0
        private void StartInitialize()
        {
            EB.Debug.Log("FlowControlAction.StartInitialize=====>");
            //设置性能配置
            PerformanceManager.Instance.UseScene(GameFlowHotfixController.ActiveStateName);
            //设置相机配置
            InitializeCamera();

            //异步加载场景跟ui
            HudLoadManager.LoadHudAsync(GameFlowHotfixController.ActiveStateName, HudLoadComplete);
            SceneLoadManager.LoadOTALevelGroupAsync(GameFlowHotfixController.ActiveStateName, SceneLoadBegin, SceneLoadFailed, SceneLoadLoading, SceneLoadFinished);

            //性能
            var perfInfo = PerformanceManager.Instance.CurrentEnvironmentInfo;

            SetQualityLevel(PerformanceManager.Instance.PerformanceInfo.CpuProfileName);
            Shader.globalMaximumLOD              = perfInfo.lod;
            QualitySettings.blendWeights         = (BlendWeights)perfInfo.blendWeights;
            QualitySettings.antiAliasing         = (int)perfInfo.msaa;
            QualitySettings.anisotropicFiltering = (AnisotropicFiltering)perfInfo.aniso;
            EB.Debug.Log("<=====FlowControlAction.StartInitialize");
        }