Эх сурвалжийг харах

添加进度条100%回调

leiyasi 1 жил өмнө
parent
commit
7c6aff57cb

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/DressUpGuideView.cs

@@ -146,7 +146,12 @@ namespace GFGGame
                 yield return new WaitForEndOfFrame();
             }
 
-            ViewManager.Hide<LoadingView>();
+            LoadingView.Instance.SetProgress(100, () =>
+            {
+                ViewManager.Hide<LoadingView>();
+            }
+            );
+            
         }
 
         private void RenderListDressUpItem(int index, GObject item)

+ 7 - 4
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -6,7 +6,6 @@ using System.Collections.Generic;
 using System.Text.RegularExpressions;
 using System;
 using YooAsset;
-using System.Threading.Tasks;
 using GFGGame.Launcher;
 
 namespace GFGGame
@@ -966,7 +965,6 @@ namespace GFGGame
                 Debug.LogError($"加载{fileName}失败 {error}");
             };
 
-
             downloaderOperation.OnDownloadProgressCallback =
             (totalDownloadCount, currentDownloadCount, totalDownloadSizeBytes, currentDownloadSizeBytes) =>
             {
@@ -992,8 +990,13 @@ namespace GFGGame
                 yield break;
             }
 
-            ViewManager.Hide<LoadingView>();
-            ShowNextStep(_storyStartID);
+            // 加载完成
+            LoadingView.Instance.SetProgress(100, () =>
+                {
+                    ViewManager.Hide<LoadingView>();
+                    ShowNextStep(_storyStartID);
+                }
+            );
         }
     }
 }