GetAllNotes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user