@@ -29,7 +29,7 @@ namespace Ichni.RhythmGame
|
||||
public bool isShowingSphere;
|
||||
|
||||
public static PathNode GenerateElement(string elementName, Guid id, List<string> tags, bool isFirstGenerated,
|
||||
Track track, bool isShowingSphere)
|
||||
Track track, bool isShowingSphere, int index = -1)
|
||||
{
|
||||
PathNode pathNode = Instantiate(EditorManager.instance.basePrefabs.pathNode, track.transform)
|
||||
.GetComponent<PathNode>();
|
||||
@@ -39,7 +39,15 @@ namespace Ichni.RhythmGame
|
||||
pathNode.track = track;
|
||||
pathNode.isShowingSphere = isShowingSphere;
|
||||
pathNode.SetPathNodeSphere(isShowingSphere);
|
||||
track.trackPathSubmodule.pathNodeList.Add(pathNode);
|
||||
if (index < 0)
|
||||
{
|
||||
track.trackPathSubmodule.pathNodeList.Add(pathNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
track.trackPathSubmodule.pathNodeList.Insert(index, pathNode);
|
||||
}
|
||||
|
||||
|
||||
return pathNode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user