| Core/GameEngine/Login/Launch.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Launch/LaunchWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Login/Launch.cs
@@ -11,6 +11,7 @@ { static LaunchStage m_CurrentStage = LaunchStage.None; static int step = 0; public static ProgressInfo progressInfo { get; private set; } private void Awake() @@ -209,7 +210,7 @@ if (m_CurrentStage == LaunchStage.DownLoad) { progressInfo = new ProgressInfo(m_CurrentStage, progressInfo.totalProgress, 0f); progressInfo = new ProgressInfo(m_CurrentStage, 1, progressInfo.totalProgress, 0f); } else { @@ -225,17 +226,18 @@ else { var temp = currentTask.timer / Mathf.Min(2f, currentTask.duration); step = (int)temp + 1; partProgress = temp - (int)temp; } progressInfo = new ProgressInfo(m_CurrentStage, Mathf.Clamp01(progress), partProgress); progressInfo = new ProgressInfo(m_CurrentStage, step, Mathf.Clamp01(progress), partProgress); } } if (launchComplete) { Debug.LogFormat("启动耗时:{0}", timer); progressInfo = new ProgressInfo(m_CurrentStage, 1f, 1f); progressInfo = new ProgressInfo(m_CurrentStage, 1, 1f, 1f); this.enabled = false; StageManager.Instance.LoadLoginStage(); } @@ -934,12 +936,14 @@ public struct ProgressInfo { public LaunchStage stage; public int step; public float totalProgress; public float partProgress; public ProgressInfo(LaunchStage stage, float totalProgress, float partProgress) public ProgressInfo(LaunchStage stage, int step, float totalProgress, float partProgress) { this.stage = stage; this.step = step; this.totalProgress = totalProgress; this.partProgress = partProgress; } System/Launch/LaunchWin.cs
@@ -30,6 +30,7 @@ bool assetBuildTimeShowed = false; Launch.LaunchStage showStage = Launch.LaunchStage.None; int showStep = 0; string stepDescription = string.Empty; float backGroundTimer = 0f; @@ -108,14 +109,14 @@ m_AlphaTween.Play(); } string GetLaunchStageDescription(Launch.LaunchStage _stage) string GetLaunchStageDescription(Launch.LaunchStage _stage, int step) { switch (_stage) { case Launch.LaunchStage.SDKInit: return Language.GetFromLocal(36); case Launch.LaunchStage.AssetCopy: return Language.GetFromLocal(37); return StringUtility.Contact(Language.GetFromLocal(37), "(", step, ")"); case Launch.LaunchStage.ClientVersion: return Language.GetFromLocal(38); case Launch.LaunchStage.CheckAsset: @@ -125,7 +126,7 @@ case Launch.LaunchStage.AssetBundleInit: return Language.GetFromLocal(41); case Launch.LaunchStage.ConfigInit: return Language.GetFromLocal(42); return StringUtility.Contact(Language.GetFromLocal(42), "(", step, ")"); case Launch.LaunchStage.Complete: return Language.GetFromLocal(43); default: @@ -193,7 +194,7 @@ m_PartProgressSlider.value = progressInfo.partProgress; } DisplayStageDescription(progressInfo.stage); DisplayStageDescription(progressInfo.stage, progressInfo.step); if (!assetBuildTimeShowed && AssetVersionUtility.assetsBuildTime != DateTime.MinValue) { @@ -205,12 +206,12 @@ } private void DisplayStageDescription(Launch.LaunchStage stage) private void DisplayStageDescription(Launch.LaunchStage stage, int step) { if (showStage != stage) if (showStage != stage || showStep != step) { showStage = stage; m_StageDescription.text = GetLaunchStageDescription(stage); m_StageDescription.text = GetLaunchStageDescription(stage, step); } }