附近的人

This commit is contained in:
lishuo committed 2021-04-12 17:35:56 +08:00
1 parent 725b510748
commit 2fcd9b23fa
94 files changed
+7063 -2007

No files matched your search

+7 -3
View File
@@ -140,6 +140,7 @@ namespace Assets.Scenes.Ride.Scripts
protected virtual void Run()
{
ComputeNextSlope();//计算下一个坡度相关数据
SendTcp();
if (isStart)
{
ticks++;
@@ -172,6 +173,10 @@ namespace Assets.Scenes.Ride.Scripts
isQuit = true;
}
}
}
protected virtual void SendTcp()
{
}
//计算功率 速度 当前骑行总里程(M)心率 踏频 等
protected virtual void Compute()
@@ -296,6 +301,7 @@ namespace Assets.Scenes.Ride.Scripts
while (t < 1)
{
t += Time.deltaTime;
Vector3 v = Vector3.Lerp(prePos, nextPos, t);
Vector3 nextPosition = new Vector3((float)Math.Round(v.x, 2), (float)Math.Round(v.y, 2), (float)Math.Round(v.z, 2));
if (!nextPosition.Equals(transform.localPosition))
@@ -303,9 +309,7 @@ namespace Assets.Scenes.Ride.Scripts
transform.localPosition = nextPosition;
//Camera.main.transform.localPosition = nextPosition;
}
//控制海拔图的位置
yield return null;
yield return new WaitForEndOfFrame();
}
}
#endregion