有问题!

Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-07-21 14:24:22 +08:00
parent 2a440fdafd
commit c02ad2cc1f
9 changed files with 31993 additions and 15994 deletions

View File

@@ -11,43 +11,43 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
public partial class DTMNoteVisualHold : DTMNoteVisual, INoteVisualHold
{
public Hold hold { get; set; }
public MeshGenerator meshGenerator;
public SplinePositioner headPoint, tailPoint;
public static DTMNoteVisualHold GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
{
DTMNoteVisualHold noteVisualHold = SubstantialObject.GenerateElement(elementName, id, tags,
DTMNoteVisualHold noteVisualHold = SubstantialObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<DTMNoteVisualHold>();
return noteVisualHold;
}
public override void FirstSetUpObject(bool isFirstGenerated)
{
NoteBase note = parentElement as NoteBase;
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
if(!note.isOnTrack) throw new System.Exception("这种HoldNoteVisual只能生成在Track上。");
if (note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
if (!note.isOnTrack) throw new System.Exception("这种HoldNoteVisual只能生成在Track上。");
this.note = note;
note.noteVisual = this;
this.hold = note as Hold;
this.headPoint = notePartList[0].GetComponent<SplinePositioner>();
this.meshGenerator = notePartList[1].GetComponent<MeshGenerator>();
this.tailPoint = notePartList[2].GetComponent<SplinePositioner>();
this.hold.trackPositioner.autoUpdate = false;
headPoint.spline = hold.track.trackPathSubmodule.path;
meshGenerator.spline = hold.track.trackPathSubmodule.path;
tailPoint.spline = hold.track.trackPathSubmodule.path;
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
float startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime);
float endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
hold.trackPositioner.SetPercent(startPercent);
meshGenerator.SetClipRange(startPercent, endPercent);
headPoint.SetPercent(startPercent);
@@ -63,7 +63,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
effectSubmodule.effectCollection["Miss"].Add(new DTMNoteMissTransparent(this, 0.2f));
}
}
public override void AfterInitialize()
{
base.AfterInitialize();
@@ -87,7 +87,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
}
}
}
public partial class DTMNoteVisualHold
{
public override void SaveBM()
@@ -103,7 +103,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
return;
}
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime);
endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
@@ -130,29 +130,29 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
//throw new NotImplementedException();
}
}
namespace Beatmap
{
public class DTMNoteVisualHold_BM : SubstantialObject_BM
{
public DTMNoteVisualHold_BM()
{
}
public DTMNoteVisualHold_BM(string elementName, Guid id, List<string> tags,
public DTMNoteVisualHold_BM(string elementName, Guid id, List<string> tags,
GameElement_BM parent, string themeBundleName, string objectName) :
base(elementName, id, tags, parent, themeBundleName, objectName)
{
}
public override void ExecuteBM()
{
matchedElement = DTMNoteVisualHold.GenerateElement(elementName, elementGuid, tags, false,
matchedElement = DTMNoteVisualHold.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName);
}
public override GameElement DuplicateBM(GameElement parent)
{
return DTMNoteVisualHold.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);