Clip保存与读取

This commit is contained in:
SoulliesOfficial
2025-03-01 12:50:13 -05:00
parent ed863d6591
commit 6aba331079
27 changed files with 3573 additions and 32 deletions

View File

@@ -163,9 +163,10 @@ namespace Ichni.RhythmGame
}
/// <summary>
/// 获取自身和所有子GameElement
/// 获取所有子GameElement
/// </summary>
public List<GameElement> GetAllGameElementsFromThis()
/// <param name="includeThis">是否包括自身</param>
public List<GameElement> GetAllGameElementsFromThis(bool includeThis = true)
{
void GetAllChildrenRecursively(GameElement parent, List<GameElement> elements)
{
@@ -178,6 +179,8 @@ namespace Ichni.RhythmGame
List<GameElement> gameElements = new List<GameElement> { this };
GetAllChildrenRecursively(this, gameElements);
if(!includeThis) gameElements.Remove(this);
return gameElements;
}
@@ -197,7 +200,6 @@ namespace Ichni.RhythmGame
public string elementName;
public List<string> tags;
public Guid elementGuid;
public Guid attachedElementGuid;
public GameElement_BM()
{

View File

@@ -40,13 +40,11 @@ namespace Ichni.RhythmGame
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
(attachedElement as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attachedElement as NoteBase);
attachedElement.submoduleList.Add((attachedElement as NoteBase).noteJudgeSubmodule);
}
public override void DuplicateBM(GameElement attached)
{
(attached as NoteBase).noteJudgeSubmodule = new NoteJudgeSubmodule(attached as NoteBase);
attached.submoduleList.Add((attached as NoteBase).noteJudgeSubmodule);
}
}

View File

@@ -11,7 +11,6 @@ namespace Ichni.RhythmGame
public TrackSubmodule(Track track) : base(track)
{
this.track = track;
this.track.submoduleList.Add(this);
}
}
}