附近的人
This commit is contained in:
1 parent
725b510748
commit
2fcd9b23fa
94 files changed
+7063
-2007
No files matched your search
@@ -18,38 +18,44 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
base.Init();
|
||||
}
|
||||
TargetData targetData;
|
||||
/// <summary>
|
||||
/// 计算数据,父类会在此方法后处理动画
|
||||
/// </summary>
|
||||
protected override void Compute()
|
||||
protected override void Compute()
|
||||
{
|
||||
//计算数据
|
||||
//speed = mainController.UpDateSpeed();
|
||||
heartRate = mainController.UpDateHeart()??0;
|
||||
power = mainController.UpdatePower();
|
||||
cadance = mainController.UpdateCadence();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
power = 2000;//测试功率
|
||||
|
||||
#endif
|
||||
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
||||
distance = mainController.UpdateDistance(speed);
|
||||
totalDistance += distance;
|
||||
//记录骑行数据
|
||||
#if UNITY_EDITOR
|
||||
var recorderData = cyclingExcutor.recorderData;
|
||||
recorderData.RiderDatas.Add(new TargetData
|
||||
targetData = new TargetData
|
||||
{
|
||||
Ticks = ticks,
|
||||
_Power = power,
|
||||
_Speed = speed,
|
||||
_Distance = totalDistance> mapData.TotalDistance? mapData.TotalDistance: totalDistance,
|
||||
_Distance = totalDistance > mapData.TotalDistance ? mapData.TotalDistance : totalDistance,
|
||||
_Cadence = cadance,
|
||||
_HeartRate = heartRate,
|
||||
_Lat = nextlatlong.x,
|
||||
_Lon = nextlatlong.y
|
||||
});
|
||||
};
|
||||
recorderData.RiderDatas.Add(targetData);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
protected override void SendTcp()
|
||||
{
|
||||
mainController.cyclingController.Run(null);
|
||||
}
|
||||
//上传数据
|
||||
protected override void Upload()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user