【优化】热更新界面显示优化
parent
1b6c9e6515
commit
83fa0d7f85
|
@ -2212,4 +2212,4 @@ MonoBehaviour:
|
||||||
m_HorizontalOverflow: 1
|
m_HorizontalOverflow: 1
|
||||||
m_VerticalOverflow: 1
|
m_VerticalOverflow: 1
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: 56%
|
m_Text:
|
||||||
|
|
|
@ -292,7 +292,7 @@ namespace GameLogic
|
||||||
void OnResUpdateProgress(ResUpdateProgress progress)
|
void OnResUpdateProgress(ResUpdateProgress progress)
|
||||||
{
|
{
|
||||||
slider.UpdateValue(progress.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>
|
/// <summary>
|
||||||
|
|
|
@ -45,7 +45,9 @@ namespace GameLogic
|
||||||
{
|
{
|
||||||
if (Mathf.Abs(slider.value - cur) < 0.005)
|
if (Mathf.Abs(slider.value - cur) < 0.005)
|
||||||
return;
|
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) + "%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue