From dc348af486f8a6e23ab340f34a86e4dc9f6e405d Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 23 一月 2019 15:53:08 +0800
Subject: [PATCH] 5971 双进度条表现逻辑
---
Core/GameEngine/Login/Launch.cs | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index 200fd54..0b317e5 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/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); }
}
--
Gitblit v1.8.0