GetAllNotes

This commit is contained in:
SoulliesOfficial
2025-04-30 22:20:44 -04:00
parent 40f6d7ccdd
commit a662b28e17
6 changed files with 65 additions and 1484 deletions

View File

@@ -50,7 +50,7 @@ namespace Ichni.RhythmGame
List<EffectBase> effectList = new List<EffectBase>();
foreach (var effectBM in effect.Value)
{
if (BeatmapContainer_BM.LowPriorityDataTypes.Contains(effectBM.GetType()))
if (BeatmapContainer_BM.LowPriorityDataTypes.Contains(effectBM.GetType())) // 如果是低优先级数据类型
{
(EditorManager.instance.beatmapContainer).lowPriorityActions.Add(() =>
{
@@ -61,7 +61,6 @@ namespace Ichni.RhythmGame
{
effectList.Add(effectBM.ConvertToGameType(attachedGameElement));
}
}
effectCollection.Add(effect.Key, effectList);
}

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Lean.Pool;
using Sirenix.OdinInspector;
using UnityEngine;
namespace Ichni.RhythmGame
@@ -90,6 +91,29 @@ namespace Ichni.RhythmGame
}
}
public partial class ElementFolder
{
[Button("Test GetAllNotes")]
public List<NoteBase> GetAllNotes()
{
List<NoteBase> notes = new List<NoteBase>();
foreach (GameElement element in childElementList)
{
if (element is NoteBase note)
{
notes.Add(note);
}
}
foreach (NoteBase note in notes)
{
Debug.Log(note.GetType() + " " + note.elementName + " " + note.exactJudgeTime);
}
return notes;
}
}
namespace Beatmap
{
public class ElementFolder_BM : GameElement_BM

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Lean.Pool;
using Sirenix.OdinInspector;
using UnityEngine;
namespace Ichni.RhythmGame
@@ -292,6 +293,29 @@ namespace Ichni.RhythmGame
SetOnlyStartEndPathNodeSphereEnabled);
}
}
public partial class Track
{
[Button("Test GetAllNotes")]
public List<NoteBase> GetAllNotes()
{
List<NoteBase> notes = new List<NoteBase>();
foreach (GameElement element in childElementList)
{
if (element is NoteBase note)
{
notes.Add(note);
}
}
foreach (NoteBase note in notes)
{
Debug.Log(note.GetType() + " " + note.elementName + " " + note.exactJudgeTime);
}
return notes;
}
}
public partial class Track
{