少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-29 4f2114f9ff95f6511ec4e1c314362907d99f17c8
1756 分包下载前端显示优化
1个文件已修改
37 ■■■■■ 已修改文件
System/AssetVersion/InGameDownLoadProgress.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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()