本地合并备份

This commit is contained in:
lishuo committed 2021-04-27 15:15:51 +08:00
1 parent 2b275d6dc5
commit 4353a38c96
44 files changed
+5568 -4294

No files matched your search

+14 -12
View File
@@ -192,6 +192,7 @@ namespace Assets.Scenes.Ride.Scripts
public int CurrentIndex;
private int index;
public double CurrentDistance;//当前所处区间距离
public double NextSlopeTotalDistance;
//当前距离所在的海拔/坡度/距离 下一个点的坡度以及剩余距离
void ComputeNextSlope()
{
@@ -209,21 +210,22 @@ namespace Assets.Scenes.Ride.Scripts
break;
}
}
preIndex = index > 0 ? index - 1:0;
//计算当前海拔和坡度
elevation = pointList[index].Elevation;
currentSlope = pointList[index].Grade;
//计算下一个点的坡度和距离
int nextIndex = index == pointList.Count - 1 ? index : index + 1;
CurrentIndex = nextIndex;
preIndex = index > 0 ? index - 1:0;//前一个索引
CurrentIndex = index;//当前索引
int nextIndex = index == pointList.Count - 1 ? index : index + 1; //计算下一个点的坡度和距离
PreElevation = pointList[preIndex].Elevation; //计算上一个海拔
PreSlope = pointList[preIndex].Grade; //计算上一个坡度
//计算当前海拔和坡度&当前区间距离
elevation = pointList[CurrentIndex].Elevation;
currentSlope = pointList[CurrentIndex].Grade;
CurrentDistance = pointList[CurrentIndex].Distance;
//计算下一个海拔和坡度&当前区间距离
nextSlope = pointList[nextIndex].Grade;
nextSlopeDistance = sumDistance - totalDistance * 1000;
NextSlopeTotalDistance = pointList[nextIndex].Distance;
currentSlopeDistance = totalDistance * 1000 - (sumDistance - pointList[index].Distance);
//计算当前区间距离
CurrentDistance = pointList[CurrentIndex].Distance;
//计算上一个坡度
PreElevation = pointList[preIndex].Elevation;
PreSlope = pointList[preIndex].Grade;
}
public double PreElevation;
public double PreSlope;