From dc1cc8378f4271a6fffbe60dff0630cdead6cab1 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 31 一月 2019 12:00:53 +0800
Subject: [PATCH] 3335 场景切换重构
---
System/Loading/LoadingWin.cs | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/System/Loading/LoadingWin.cs b/System/Loading/LoadingWin.cs
index edb0cac..e1a307d 100644
--- a/System/Loading/LoadingWin.cs
+++ b/System/Loading/LoadingWin.cs
@@ -196,7 +196,6 @@
{
m_ContainerProgress.gameObject.SetActive(true);
m_ProgressSlider.value = refProgress = 0f;
- StageManager.Instance.loadingProgressEvent += UpdateLoadingProgress;
}
}
@@ -208,8 +207,6 @@
protected override void OnPreClose()
{
- StageManager.Instance.loadingProgressEvent -= UpdateLoadingProgress;
-
if (!AssetSource.uiFromEditor)
{
AssetBundleUtility.Instance.UnloadAssetBundle("ui/sprite/loading", true, false);
@@ -229,14 +226,8 @@
if (loadingType == LoadingType.Normal)
{
- refProgress = Mathf.Clamp01(refProgress + Time.deltaTime / expectDuration);
- m_ProgressSlider.value = refProgress;
+ m_ProgressSlider.value = StageLoad.Instance.progress;
}
- }
-
- void UpdateLoadingProgress(float _progress)
- {
- m_ProgressSlider.value = refProgress = Mathf.Max(_progress, refProgress);
}
private List<int> GetShowFunctions(int _level)
--
Gitblit v1.8.0