伴侣骑行
This commit is contained in:
1 parent
34cde86a28
commit
7744eec847
42 files changed
+18737
-13497
No files matched your search
@@ -29,14 +29,16 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
heartRate = mainController.UpDateHeart()??0;
|
||||
power = mainController.UpdatePower();
|
||||
cadance = mainController.UpdateCadence();
|
||||
#if UNITY_EDITOR
|
||||
weight = App.CurrentUser.Weight;
|
||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||
|
||||
power = 2000;//测试功率
|
||||
#endif
|
||||
|
||||
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
||||
distance = mainController.UpdateDistance(speed);
|
||||
totalDistance += distance;
|
||||
//记录骑行数据
|
||||
#if UNITY_EDITOR
|
||||
|
||||
var recorderData = cyclingExcutor.recorderData;
|
||||
targetData = new TargetData
|
||||
{
|
||||
@@ -50,21 +52,21 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
_Lon = nextlatlong.y
|
||||
};
|
||||
recorderData.RiderDatas.Add(targetData);
|
||||
#endif
|
||||
|
||||
}
|
||||
protected override void SendTcp()
|
||||
{
|
||||
mainController.cyclingController.Run(null);
|
||||
}
|
||||
//上传数据
|
||||
protected override void Upload()
|
||||
public override void Upload()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
|
||||
string imageFileName = base.CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f));
|
||||
cyclingExcutor.recorderData.IsCompleted = totalDistance == mapData.TotalDistance;
|
||||
cyclingExcutor.recorderData.EndDistance = totalDistance;
|
||||
cyclingExcutor.recorderData.SaveData(cyclingExcutor.Mode,null, imageFileName);
|
||||
#endif
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user