少年修仙传客户端代码仓库
client_Wu Xijin
2019-01-23 dc348af486f8a6e23ab340f34a86e4dc9f6e405d
5971 双进度条表现逻辑
1个文件已修改
33 ■■■■ 已修改文件
Core/GameEngine/Login/Launch.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Login/Launch.cs
@@ -213,25 +213,28 @@
                currentTask = null;
            }
            if (m_CurrentStage != LaunchStage.DownLoad)
            if (m_CurrentStage == LaunchStage.DownLoad)
            {
                timer += Time.deltaTime;
            }
            var progress = Mathf.Lerp(progressInfo.totalProgress, timer / totalTime, 0.5f);
            var partProgress = 0f;
            if (currentTask == null)
            {
                partProgress = 0f;
                progressInfo = new ProgressInfo(m_CurrentStage, progressInfo.totalProgress, 0f);
            }
            else
            {
                var temp = currentTask.timer / Mathf.Min(1f, currentTask.duration);
                partProgress = temp - (int)temp;
            }
                timer += Time.deltaTime;
                var progress = Mathf.Lerp(progressInfo.totalProgress, timer / totalTime, 0.5f);
            progressInfo = new ProgressInfo(m_CurrentStage, Mathf.Clamp01(progress), partProgress);
                var partProgress = 0f;
                if (currentTask == null)
                {
                    partProgress = 0f;
                }
                else
                {
                    var temp = currentTask.timer / Mathf.Min(1f, currentTask.duration);
                    partProgress = temp - (int)temp;
                }
                progressInfo = new ProgressInfo(m_CurrentStage, Mathf.Clamp01(progress), partProgress);
            }
        }
        if (launchComplete)
@@ -795,7 +798,7 @@
    public class ConfigInitTask : LaunchTask
    {
        public override float expectTime {
            get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", 5f); }
            get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", 10f); }
            protected set { LocalSave.SetFloat("ConfigInitTask_ExpectTime", value); }
        }