小改
This commit is contained in:
@@ -53,6 +53,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public partial class TrackPathSubmodule
|
||||
{
|
||||
|
||||
private void SetUpSplineComputer(Track.TrackSpaceType trackSpaceType, Track.TrackSamplingType trackSamplingType)
|
||||
{
|
||||
path.type = (Spline.Type)trackSpaceType;
|
||||
@@ -101,9 +102,27 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
SetPathNode(pathNode);
|
||||
}
|
||||
|
||||
ClosePath();
|
||||
path.Rebuild(true);
|
||||
}
|
||||
public void SortPathnodeInChildren()//emm待用吧
|
||||
{
|
||||
Debug.Log("TrackSort");
|
||||
track.childElementList.Sort((x, y) =>
|
||||
{
|
||||
// 处理两个都是索引类的情况
|
||||
if (x is PathNode idxX && y is PathNode idxY)
|
||||
return idxX.index.CompareTo(idxY.index);
|
||||
|
||||
// 处理两个都是非索引类的情况 - 保持原顺序
|
||||
if (x is not PathNode && y is not PathNode)
|
||||
return 0;
|
||||
|
||||
// 混合类型处理:索引类排在前面
|
||||
return x is PathNode ? 1 : -1;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public partial class TrackPathSubmodule
|
||||
|
||||
Reference in New Issue
Block a user