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

File diff suppressed because one or more lines are too long

View File

@@ -50,7 +50,7 @@ namespace Ichni.RhythmGame
List<EffectBase> effectList = new List<EffectBase>(); List<EffectBase> effectList = new List<EffectBase>();
foreach (var effectBM in effect.Value) 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(() => (EditorManager.instance.beatmapContainer).lowPriorityActions.Add(() =>
{ {
@@ -61,7 +61,6 @@ namespace Ichni.RhythmGame
{ {
effectList.Add(effectBM.ConvertToGameType(attachedGameElement)); effectList.Add(effectBM.ConvertToGameType(attachedGameElement));
} }
} }
effectCollection.Add(effect.Key, effectList); effectCollection.Add(effect.Key, effectList);
} }

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using Ichni.Editor; using Ichni.Editor;
using Ichni.RhythmGame.Beatmap; using Ichni.RhythmGame.Beatmap;
using Lean.Pool; using Lean.Pool;
using Sirenix.OdinInspector;
using UnityEngine; using UnityEngine;
namespace Ichni.RhythmGame 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 namespace Beatmap
{ {
public class ElementFolder_BM : GameElement_BM public class ElementFolder_BM : GameElement_BM

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using Ichni.Editor; using Ichni.Editor;
using Ichni.RhythmGame.Beatmap; using Ichni.RhythmGame.Beatmap;
using Lean.Pool; using Lean.Pool;
using Sirenix.OdinInspector;
using UnityEngine; using UnityEngine;
namespace Ichni.RhythmGame namespace Ichni.RhythmGame
@@ -292,6 +293,29 @@ namespace Ichni.RhythmGame
SetOnlyStartEndPathNodeSphereEnabled); 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 public partial class Track
{ {

View File

@@ -558,7 +558,7 @@
} }
},{ },{
"__type" : "Ichni.RhythmGame.Beatmap.Hold_BM,Assembly-CSharp", "__type" : "Ichni.RhythmGame.Beatmap.Hold_BM,Assembly-CSharp",
"holdEndTime" : 1, "holdEndTime" : 2.5,
"exactJudgeTime" : 1, "exactJudgeTime" : 1,
"elementName" : "New Hold", "elementName" : "New Hold",
"tags" : [ "tags" : [
@@ -656,7 +656,7 @@
],"Holding":[ ],"Holding":[
{ {
"__type" : "Ichni.RhythmGame.ThemeBundles.MetropolisOnOrbit.Beatmap.MOONoteHoldingAnimation_BM,Assembly-CSharp", "__type" : "Ichni.RhythmGame.ThemeBundles.MetropolisOnOrbit.Beatmap.MOONoteHoldingAnimation_BM,Assembly-CSharp",
"effectTime" : 0 "effectTime" : 1.5
} }
],"Perfect":[ ],"Perfect":[

File diff suppressed because one or more lines are too long