This commit is contained in:
2025-10-18 15:58:55 +08:00
parent 1c78e7328c
commit 3361e276e5
6 changed files with 104191 additions and 11209 deletions

View File

@@ -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
}
}
}

View File

@@ -33,6 +33,8 @@ namespace Ichni.Editor
public RectTransform GetinputArea;
private string BeatText;
private string TimeText;
public void Update()
{
if (EditorManager.instance.musicPlayer.isPlaying) UpdateTime();
@@ -43,7 +45,14 @@ namespace Ichni.Editor
DetectSetRange();
DetectPointer();
}
if (BeatField.text != BeatText)
{
BeatField.text = BeatText;
}
if (TimeField.text != TimeText)
{
TimeField.text = TimeText;
}
}
@@ -154,8 +163,8 @@ namespace Ichni.Editor
}
private void UpdateTime()
{
TimeField.text = songTime.ToString("F2");
BeatField.text = songBeat.ToString("F2");
TimeText = songTime.ToString("F2");
BeatText = songBeat.ToString("F2");
}
private Tweener _activeTweener = null; // 保存当前动画的引用