将Spline移出Plugin,以调整SplineRenderer的OnWillCameraRender

This commit is contained in:
SoulliesOfficial
2025-03-01 22:58:20 -05:00
parent 860d7393fb
commit 5d775ae687
529 changed files with 237 additions and 119 deletions

View File

@@ -12,6 +12,7 @@ namespace Ichni.RhythmGame
public partial class TrackPathSubmodule : TrackSubmodule
{
public SplineComputer path;
public SplineRenderer trackDisplay;
public List<PathNode> pathNodeList;
public Track.TrackSpaceType trackSpaceType;
@@ -21,6 +22,7 @@ namespace Ichni.RhythmGame
public TrackPathSubmodule(Track track, Track.TrackSpaceType trackSpaceType, Track.TrackSamplingType trackSamplingType, bool isClosed) : base(track)
{
this.path = track.AddComponent<SplineComputer>();
this.track.trackPathSubmodule = this;
this.pathNodeList = new List<PathNode>();
this.trackSpaceType = trackSpaceType;
@@ -29,6 +31,10 @@ namespace Ichni.RhythmGame
SetUpSplineComputer(this.trackSpaceType, this.trackSamplingType);
//闭合路径在PathNode生成时执行在初始化的情况下PathNode数量为0不会执行闭合操作
this.trackDisplay = UnityEngine.Object.Instantiate(EditorManager.instance.basePrefabs.trackDisplay, track.transform).GetComponent<SplineRenderer>();
this.trackDisplay.spline = path;
this.trackDisplay.size = 0.1f;
}
}