人物移动调整
This commit is contained in:
1 parent
70626ae741
commit
10c82703f4
1 file changed
+8
-13
@@ -158,8 +158,15 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
ticks++;
|
||||
Compute();//接受蓝牙设备数据计算
|
||||
//characterAnimator.SetBool("IsRide", false);//初始化动画状态
|
||||
if (totalDistance <= mapData.TotalDistance)
|
||||
if (totalDistance > mapData.TotalDistance)
|
||||
{
|
||||
distance = totalDistance - mapData.TotalDistance;
|
||||
totalDistance = mapData.TotalDistance;
|
||||
//characterAnimator.SetBool("ReachEnd", true);//到达终点
|
||||
Upload();
|
||||
isQuit = true;
|
||||
}
|
||||
|
||||
//数据处理
|
||||
nextlatlong = Along(totalDistance);//下一个坐标
|
||||
nextPos = map.GeoToWorldPosition(nextlatlong);//下一个点
|
||||
@@ -170,19 +177,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
if (distance > 0)
|
||||
{
|
||||
//characterAnimator.SetBool("IsRide", true);//开始移动动画
|
||||
|
||||
StartCoroutine(MoveTo());//移动
|
||||
//transform.localPosition = nextPos;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
totalDistance = mapData.TotalDistance;
|
||||
//characterAnimator.SetBool("ReachEnd", true);//到达终点
|
||||
//Task.Run(() => { });//异步上传数据
|
||||
Upload();
|
||||
//mainController.isStart = false;
|
||||
isQuit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user