点击预览位置,alt——上下挪动位置

Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2026-02-13 17:40:50 +08:00
parent c21dc74576
commit 96a2c60e16
34 changed files with 23940 additions and 211416 deletions

View File

@@ -556,7 +556,8 @@ namespace ichni.RhythmGame // [修复] 修正命名空间首字母大写,符
}
public static FastNoteTracker GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement)
bool isFirstGenerated, GameElement parentElement,
bool isEnabled = true, bool showNotePreview = false, float horizonWidth = 5f, int beatDiver = 1)
{
FastNoteTracker fastNoteTracker = Instantiate(EditorManager.instance.basePrefabs.emptyObject, parentElement.transform)
.AddComponent<FastNoteTracker>();
@@ -566,6 +567,10 @@ namespace ichni.RhythmGame // [修复] 修正命名空间首字母大写,符
return null;
}
fastNoteTracker.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
fastNoteTracker.IsEnabled = isEnabled;
fastNoteTracker.showNotePreview = showNotePreview;
fastNoteTracker.horizonWidth = horizonWidth;
fastNoteTracker.BeatDiver = beatDiver;
return fastNoteTracker;
}
@@ -574,10 +579,23 @@ namespace ichni.RhythmGame // [修复] 修正命名空间首字母大写,符
base.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
//parentElement.refreshAction += AdjustBeatLine;
}
public override void AfterInitialize()
{
Observable.NextFrame().Subscribe(_ => Refresh());
}
public override void SaveBM()
{
matchedBM = new FastNoteTracker_BM(elementName, elementGuid, tags, parentElement.elementGuid);
matchedBM = new FastNoteTracker_BM(
elementName,
elementGuid,
tags,
parentElement.elementGuid,
IsEnabled,
showNotePreview,
horizonWidth,
BeatDiver
);
}
}
}
@@ -586,12 +604,21 @@ namespace Ichni.RhythmGame.Beatmap
{
public class FastNoteTracker_BM : GameElement_BM
{
public FastNoteTracker_BM(string elementName, Guid id, List<string> tags, Guid attachedElementGuid)
public bool IsEnabled { get; set; }
public bool showNotePreview { get; set; }
public float horizonWidth { get; set; }
public int beatDiver { get; set; }
public FastNoteTracker_BM(string elementName, Guid id, List<string> tags, Guid attachedElementGuid, bool IsEnabled, bool showNotePreview, float horizonWidth, int beatDiver)
{
this.elementName = elementName;
this.elementGuid = id;
this.tags = tags;
this.attachedElementGuid = attachedElementGuid;
this.IsEnabled = IsEnabled;
this.showNotePreview = showNotePreview;
this.horizonWidth = horizonWidth;
this.beatDiver = beatDiver;
}
public override GameElement DuplicateBM(GameElement attached)