From 61b5058b990da2fe7f4b76e1e61b817d4f511432 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期四, 30 八月 2018 10:28:32 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/AssetVersion/InGameDownLoadProgress.cs | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/System/AssetVersion/InGameDownLoadProgress.cs b/System/AssetVersion/InGameDownLoadProgress.cs
index 5df103a..9e6c7b1 100644
--- a/System/AssetVersion/InGameDownLoadProgress.cs
+++ b/System/AssetVersion/InGameDownLoadProgress.cs
@@ -18,19 +18,26 @@
private void Awake()
{
- if (InGameDownLoad.Instance.dominantState != InGameDownLoad.Dominant.None
- && InGameDownLoad.Instance.state != InGameDownLoad.State.Completed)
+ if (!InGameDownLoad.Instance.hasReward
+ && InGameDownLoad.Instance.completeDownLoadAccount == PlayerDatas.Instance.baseData.AccID)
{
- this.gameObject.SetActive(true);
m_ProgressText.gameObject.SetActive(true);
+ m_ProgressText.text = "100%";
+ this.gameObject.SetActive(true);
}
- else if (!InGameDownLoad.Instance.hasReward
- && InGameDownLoad.Instance.completeDownLoadAccount == PlayerDatas.Instance.baseData.AccID)
+ else if (InGameDownLoad.Instance.dominantState != InGameDownLoad.Dominant.None)
{
- m_ProgressText.gameObject.SetActive(true);
- var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
- m_ProgressText.text = StringUtility.Contact(progress, "%");
this.gameObject.SetActive(true);
+ m_ProgressText.gameObject.SetActive(true);
+ if (InGameDownLoad.Instance.state != InGameDownLoad.State.Completed)
+ {
+ m_ProgressText.text = "100%";
+ }
+ else
+ {
+ var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
+ m_ProgressText.text = StringUtility.Contact(progress, "%");
+ }
}
else
{
@@ -72,7 +79,6 @@
{
case InGameDownLoad.State.Completed:
this.gameObject.SetActive(false);
- m_ProgressText.gameObject.SetActive(false);
break;
case InGameDownLoad.State.None:
case InGameDownLoad.State.Prepared:
@@ -92,8 +98,7 @@
case InGameDownLoad.State.Award:
this.gameObject.SetActive(true);
m_ProgressText.gameObject.SetActive(true);
- var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
- m_ProgressText.text = StringUtility.Contact(progress, "%");
+ m_ProgressText.text = "100%";
break;
}
}
@@ -106,16 +111,18 @@
private void UpdateDownLoadProgress()
{
m_ProgressSlider.fillAmount = InGameDownLoad.Instance.progress;
-
- if (InGameDownLoad.Instance.state == InGameDownLoad.State.DownLoad)
+ if (m_ProgressText != null)
{
- if (m_ProgressText != null)
+ if (InGameDownLoad.Instance.state == InGameDownLoad.State.Award)
+ {
+ m_ProgressText.text = "100%";
+ }
+ else
{
var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
m_ProgressText.text = StringUtility.Contact(Mathf.Clamp(progress, 0, 99), "%");
}
}
-
}
private void OpenInGameDownloadWin()
--
Gitblit v1.8.0