From c1f4cca196346bf3b3baace18557c4680bf6037a Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 24 一月 2019 17:12:10 +0800
Subject: [PATCH] 5971  双进度条表现逻辑

---
 Core/GameEngine/Login/Launch.cs |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index 5e2c48e..d0c9330 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/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;
         }

--
Gitblit v1.8.0