人物动画调整

This commit is contained in:
lishuo committed 2021-05-14 19:26:15 +08:00
1 parent eb70ee4397
commit 470d52b1bc
5 files changed
+1603 -426

No files matched your search

+18 -1
View File
@@ -124,7 +124,24 @@ namespace Assets.Scenes.Ride.Scripts
if (characterAnimator != null && mapData != null)
{
characterAnimator.SetFloat("Speed", (float)speed);
if (totalDistance >= mapData.TotalDistance)
characterAnimator.SetFloat("Slope", (float)currentSlope);
if (currentSlope > 5)
{
characterAnimator.speed = 0.5f;
}
else
{
characterAnimator.speed = 1f;
}
//if (speed < 20 && speed >= 10)
//{
// characterAnimator.speed = 0.8f;
//}
//if (speed >= 20)
//{
// characterAnimator.speed = 1f;
//}
if (totalDistance >= mapData.TotalDistance)
{
characterAnimator.SetBool("ReachEnd", true);//到达终点
}