ggg
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse;
|
||||
@@ -597,9 +598,19 @@ namespace Ichni.Editor
|
||||
}
|
||||
public static void AdjustPathnodeZ(float OriginZpoint, float scale)
|
||||
{
|
||||
if (inspector.connectedGameElement == null || inspector.connectedGameElement.GetType() != typeof(Track))
|
||||
if (inspector.connectedGameElement == null)
|
||||
{
|
||||
LogWindow.Log("Please select a Track first!");
|
||||
LogWindow.Log($"please select a element (folder or track)", Color.red);
|
||||
|
||||
return;
|
||||
}
|
||||
if (inspector.connectedGameElement.GetType() != typeof(Track))
|
||||
{
|
||||
foreach (var i in inspector.connectedGameElement.childElementList.OfType<Track>())
|
||||
{
|
||||
inspector.connectedGameElement = i;
|
||||
AdjustPathnodeZ(OriginZpoint, scale);
|
||||
}
|
||||
return;
|
||||
}
|
||||
Track track = (Track)inspector.connectedGameElement;
|
||||
@@ -618,6 +629,11 @@ namespace Ichni.Editor
|
||||
pathnode.transformSubmodule.Refresh();
|
||||
pathnode.Refresh();
|
||||
}
|
||||
foreach (var i in track.childElementList.OfType<Track>())
|
||||
{
|
||||
inspector.connectedGameElement = i;
|
||||
AdjustPathnodeZ(OriginZpoint, scale);
|
||||
}
|
||||
}
|
||||
public static void FloorAnim()
|
||||
{
|
||||
@@ -728,7 +744,7 @@ namespace Ichni.Editor
|
||||
NewTrack.Refresh();
|
||||
Observable.Timer(TimeSpan.FromSeconds(0.3f)).Subscribe(_ =>
|
||||
{
|
||||
NewTrack?.trackPathSubmodule.path.Rebuild(true);
|
||||
NewTrack?.trackPathSubmodule.path.RebuildImmediate(true, true);
|
||||
DTMNoteVisualHold dTMNoteVisualHold = newHold.noteVisual as DTMNoteVisualHold;
|
||||
dTMNoteVisualHold.meshGenerator.Rebuild();
|
||||
});
|
||||
@@ -748,12 +764,14 @@ namespace Ichni.Editor
|
||||
LogWindow.Log("the Hold may not be split currently", Color.yellow);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var hold in holds)
|
||||
{
|
||||
inspector.connectedGameElement = hold;
|
||||
SplitHoldToTrack(PathnodesCount);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Rebuild()
|
||||
{
|
||||
foreach (GameElement element in EditorManager.instance.beatmapContainer.gameElementList)
|
||||
@@ -764,9 +782,12 @@ namespace Ichni.Editor
|
||||
}
|
||||
foreach (Track track in element.GetAllGameElementsFromThis().OfType<Track>())
|
||||
{
|
||||
track?.trackPathSubmodule.path.Rebuild(true);
|
||||
track?.trackPathSubmodule.path.RebuildImmediate(true, true);
|
||||
}
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
UnityEditorInternal.InternalEditorUtility.RepaintAllViews();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user