【优化】热更新界面显示优化

dev_chengFeng
JieLing 2020-12-30 17:24:43 +08:00
parent 1b6c9e6515
commit 83fa0d7f85
3 changed files with 5 additions and 3 deletions

View File

@ -2212,4 +2212,4 @@ MonoBehaviour:
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: 56%
m_Text:

View File

@ -292,7 +292,7 @@ namespace GameLogic
void OnResUpdateProgress(ResUpdateProgress progress)
{
slider.UpdateValue(progress.Progress);
tipsText.text = string.Format("下载进度:{0}/{1}MB({2}%)", progress.SizeMB, progress.TotalSizeMB, (progress.SizeMB/progress.TotalSizeMB)*100);
tipsText.text = string.Format("下载进度:{0}/{1}MB({2}%)", progress.SizeMB.ToString("f2"), progress.TotalSizeMB.ToString("f2"), ((progress.SizeMB/progress.TotalSizeMB)*100).ToString("f2"));
}
/// <summary>

View File

@ -45,7 +45,9 @@ namespace GameLogic
{
if (Mathf.Abs(slider.value - cur) < 0.005)
return;
slider.value = Mathf.Lerp(slider.value, cur, Time.deltaTime * 5);
float fv = Mathf.Lerp(slider.value, cur, Time.deltaTime * 5);
slider.value = fv;
progress.text = Mathf.Floor(fv * 100) + "%";
}
}
}