海拔图区间微调,消息面板&线路等微调

This commit is contained in:
lishuo committed 2021-05-13 17:48:28 +08:00
1 parent b694a69f16
commit 46cc231fe7
19 files changed
+3604 -3034

No files matched your search

+13 -9
View File
@@ -1,5 +1,6 @@
using DG.Tweening;
using System;
using System.Collections;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
@@ -28,24 +29,27 @@ namespace Assets.Scenes.Ride.Scripts
{
text.text = string.Format(format, totalDistance);
index = currentIndex;
mOldScore = 0;
process.fillAmount = 0;
process.fillAmount = 1;
StartCoroutine(CompleteFill(process));
}
else
{
mScoreSequence.Append(DOTween.To(delegate (float value)
{
//if (value != newScore)
{
temp = Math.Round(value, digit);
process.fillAmount = ((float)temp / (float)totalDistance);
//向Text组件赋值
text.text = string.Format(format, temp);
}
temp = Math.Round(value, digit);
process.fillAmount = (float)(value / totalDistance);
//向Text组件赋值
text.text = string.Format(format, temp);
}, mOldScore, newScore, 1f));
//将更新后的值记录下来, 用于下一次滚动动画
mOldScore = newScore;
}
}
IEnumerator CompleteFill(Image process)
{
yield return new WaitForSeconds(0.3f);
mOldScore = 0;
process.fillAmount = 0;
}
}
}