优化
This commit is contained in:
@@ -76,6 +76,12 @@ namespace Ichni.RhythmGame
|
||||
node = new SplinePoint(position, Vector3.up, normal, size, color);
|
||||
track.trackPathSubmodule.SetPathNode(this);
|
||||
}
|
||||
public void OnDestroy()
|
||||
{
|
||||
track.trackPathSubmodule.pathNodeList.Remove(this);
|
||||
track.Refresh();
|
||||
print("PathNode " + elementName + " destroyed.");
|
||||
}
|
||||
}
|
||||
|
||||
public partial class PathNode
|
||||
@@ -98,10 +104,10 @@ namespace Ichni.RhythmGame
|
||||
base.SetUpInspector();
|
||||
|
||||
var container = inspector.GenerateContainer("Path Node");
|
||||
|
||||
|
||||
var pathNodeSettings = container.GenerateSubcontainer(3);
|
||||
var indexText = inspector.GenerateHintText(this, pathNodeSettings, "Index: " + index);
|
||||
var isShowingSphereToggle =
|
||||
var isShowingSphereToggle =
|
||||
inspector.GenerateToggle(this, pathNodeSettings, "Is Showing Sphere", nameof(isShowingSphere))
|
||||
.AddListenerFunction(() => SetPathNodeSphere(isShowingSphere));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
@@ -25,7 +26,7 @@ namespace Ichni.RhythmGame
|
||||
Track.TrackSamplingType trackSamplingType, bool isClosed, bool isShowingDisplay) : base(track)
|
||||
{
|
||||
this.path = track.AddComponent<SplineComputer>();
|
||||
|
||||
|
||||
this.pathNodeList = new List<PathNode>();
|
||||
this.trackSpaceType = trackSpaceType;
|
||||
this.trackSamplingType = trackSamplingType;
|
||||
@@ -92,10 +93,6 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
SetTrackSpaceType((int)trackSpaceType);
|
||||
SetUpSplineComputer(trackSpaceType, trackSamplingType);
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ namespace Ichni.RhythmGame
|
||||
t.trailRenderer.emitting = emitting;
|
||||
t.trailRenderer.enabled = emitting;
|
||||
if (willClear) t.trailRenderer.Clear();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user