提高骑行时间精准度和一些细节调整

This commit is contained in:
lishuo committed 2021-07-30 18:08:31 +08:00
1 parent 07a7a95aa8
commit ea70e04ec0
12 files changed
+2740 -2737

No files matched your search

@@ -120,6 +120,7 @@ namespace Assets.Scenes.Ride.Scripts
//graph = graphObject.GetComponent<GraphChartBase>();
chartDataSourceScript = mainController.chartDataSourceScript;
graph = mainController.graph;
cyclingExcutor = mainController.cyclingController;
}
IEnumerator TestExcute()
{
@@ -195,11 +196,12 @@ namespace Assets.Scenes.Ride.Scripts
}
}
}
if (totalDistance > mapData.TotalDistance)
if (totalDistance >= mapData.TotalDistance && !stopRecord)
{
distance = totalDistance - mapData.TotalDistance;
totalDistance = mapData.TotalDistance;
stopRecord = true;
mainController.cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
StartCoroutine("LateUpload");
}
@@ -650,6 +650,7 @@ public class CyclingController : DeviceServiceMonoBase
//}
isStart = false;
isQuit = true;
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
}
#endregion
@@ -676,7 +677,7 @@ public class CyclingController : DeviceServiceMonoBase
public void Save(double totalDistance)
{
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
//cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
isQuit = true;
isStart = false;
string recordId = Guid.NewGuid().ToString();
@@ -303,7 +303,7 @@ namespace Assets.Scenes.Ride.Scripts
{
head.gameObject.SetActive(true);
headPanel.GetComponent<Image>().color = blue;
rect.DOScale(new Vector3(1.5f, 1.5f, 1.5f), 0.5f);
rect.DOScale(new Vector3(1.2f, 1.2f, 1.2f), 0.5f);
}
else
{
@@ -55,10 +55,9 @@ namespace Assets.Scenes.Ride.Scripts
cadance = mainController.UpdateCadence();
weight = App.CurrentUser.Weight;
bicycleWeight = App.CurrentUser.BicycleWeight;
//#if UNITY_EDITOR
System.Random rd = new System.Random();
power = 2000; //rd.Next(150, 300);//测试功率
//#endif
#if UNITY_EDITOR
power = 2000;
#endif
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
}
catch (Exception ex)