换音效
This commit is contained in:
@@ -214,6 +214,41 @@ namespace Ichni.Editor
|
||||
flick.Refresh();
|
||||
}
|
||||
});
|
||||
|
||||
var ResetNoteAudioButton = beatmapToolsWindow.GenerateButton(beatmapToolsSettings, "Reset Note Audio", () =>
|
||||
{
|
||||
List<NoteBase> allNotes = EditorManager.instance.beatmapContainer.gameElementList.FindAll(x => x is NoteBase).ConvertAll(x => x as NoteBase);
|
||||
List<Hold> allHolds = allNotes.FindAll(x => x is Hold).ConvertAll(x => x as Hold);
|
||||
List<Flick> allFlicks = allNotes.FindAll(x => x is Flick).ConvertAll(x => x as Flick);
|
||||
|
||||
foreach (Hold hold in allHolds)
|
||||
{
|
||||
if (hold.noteAudioSubmodule.generalJudgeAudioList.Contains("DefaultTap"))
|
||||
{
|
||||
hold.submoduleList.Remove(hold.noteAudioSubmodule);
|
||||
hold.noteAudioSubmodule = null;
|
||||
hold.noteAudioSubmodule = new NoteAudioSubmodule(hold,
|
||||
new List<string>(){"DefaultEndHold"},
|
||||
new List<string>(), new List<string>(),
|
||||
new List<string>(), new List<string>(),
|
||||
new List<string>(){"DefaultStartHold"});
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Flick flick in allFlicks)
|
||||
{
|
||||
if (flick.noteAudioSubmodule.generalJudgeAudioList.Contains("DefaultStay"))
|
||||
{
|
||||
flick.submoduleList.Remove(flick.noteAudioSubmodule);
|
||||
flick.noteAudioSubmodule = null;
|
||||
flick.noteAudioSubmodule = new NoteAudioSubmodule(flick,
|
||||
new List<string>(){"DefaultFlick"},
|
||||
new List<string>(), new List<string>(),
|
||||
new List<string>(), new List<string>(),
|
||||
new List<string>());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user