海拔图区间微调,消息面板&线路等微调
This commit is contained in:
1 parent
b694a69f16
commit
46cc231fe7
19 files changed
+3604
-3034
No files matched your search
@@ -11,10 +11,6 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
#region 骑行逻辑
|
||||
TrailRenderer trail;
|
||||
//前面的人
|
||||
public double frontOffset { set; get; } = double.NegativeInfinity;
|
||||
//后面的人
|
||||
public double backOffset { set; get; } = double.MaxValue;
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
@@ -52,12 +48,29 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
weight = App.CurrentUser.Weight;
|
||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||
#if UNITY_EDITOR
|
||||
power = 3000;//测试功率
|
||||
power = 500;//测试功率
|
||||
#endif
|
||||
mainController.TrackResistance(currentSlope * App.rideSetting.sensitivity / 100);
|
||||
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
||||
distance = mainController.UpdateDistance(speed);
|
||||
totalDistance += distance;
|
||||
if (power > 0)
|
||||
{
|
||||
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
||||
distance = mainController.UpdateDistance(speed);
|
||||
totalDistance += distance;
|
||||
}
|
||||
|
||||
//计算累计爬升
|
||||
if (CurrentIndex > 0)
|
||||
{
|
||||
totalClimb = 0;
|
||||
for (int i = 1; i <= CurrentIndex; i++)
|
||||
{
|
||||
var diff = mapData.List[i].Elevation - mapData.List[i - 1].Elevation;
|
||||
if (diff > 0)
|
||||
{
|
||||
totalClimb += diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!stopRecord)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user