From 55f31b4501d8e74bc45de8250dbdad1dc3571e16 Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Tue, 1 Mar 2022 14:44:55 -0500 Subject: [PATCH] Added "ooh" toggle to DJ School --- Assets/Scripts/Games/DJSchool/DJSchool.cs | 26 ++++++++++++++++------- Assets/Scripts/Minigames.cs | 8 +++++-- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Assets/Scripts/Games/DJSchool/DJSchool.cs b/Assets/Scripts/Games/DJSchool/DJSchool.cs index 0f99c6312..3976eb713 100644 --- a/Assets/Scripts/Games/DJSchool/DJSchool.cs +++ b/Assets/Scripts/Games/DJSchool/DJSchool.cs @@ -84,7 +84,7 @@ namespace RhythmHeavenMania.Games.DJSchool bop.length = length; } - public void BreakCmon(float beat, int type) + public void BreakCmon(float beat, int type, bool ooh) { if (djYellowHolding) return; @@ -103,12 +103,17 @@ namespace RhythmHeavenMania.Games.DJSchool break; } - MultiSound.Play(new MultiSound.Sound[] + var sound = new MultiSound.Sound[] { new MultiSound.Sound(sounds[0], beat), new MultiSound.Sound(sounds[1], beat + 1f - (0.030f/Conductor.instance.secPerBeat)*Conductor.instance.musicSource.pitch), - new MultiSound.Sound(sounds[2], beat + 2f), - }); + new MultiSound.Sound("", beat + 2f) + }; + + if (ooh) + sound[2] = new MultiSound.Sound(sounds[2], beat + 2f); + + MultiSound.Play(sound); BeatAction.New(djYellow, new List() { @@ -122,16 +127,21 @@ namespace RhythmHeavenMania.Games.DJSchool }); } - public void AndStop(float beat) + public void AndStop(float beat, bool ooh) { if (djYellowHolding) return; - MultiSound.Play(new MultiSound.Sound[] + var sound = new MultiSound.Sound[] { new MultiSound.Sound("djSchool/andStop1", beat), new MultiSound.Sound("djSchool/andStop2", beat + .5f - (0.1200f/Conductor.instance.secPerBeat)*Conductor.instance.musicSource.pitch), - new MultiSound.Sound("djSchool/oohAlt", beat + 1.5f), - }); + new MultiSound.Sound("", beat + 1.5f) + }; + + if (ooh) + sound[2] = new MultiSound.Sound("djSchool/oohAlt", beat + 1.5f); + + MultiSound.Play(sound); BeatAction.New(djYellow, new List() { diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 555c57d29..95b645b67 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -279,10 +279,14 @@ namespace RhythmHeavenMania new Minigame("djSchool", "DJ School", "008c97", false, false, new List() { new GameAction("bop", delegate { DJSchool.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 0.5f, true), - new GameAction("and stop ooh", delegate { DJSchool.instance.AndStop(eventCaller.currentEntity.beat); }, 2.5f), - new GameAction("break c'mon ooh", delegate { DJSchool.instance.BreakCmon(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 3f, false, new List() + new GameAction("and stop ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.AndStop(e.beat, e.toggle); }, 2.5f, false, new List() + { + new Param("toggle", true, "Ooh") + }), + new GameAction("break c'mon ooh", delegate { var e = eventCaller.currentEntity; DJSchool.instance.BreakCmon(e.beat, e.type, e.toggle); }, 3f, false, new List() { new Param("type", DJSchool.DJVoice.Standard, "Voice"), + new Param("toggle", true, "Ooh") }), new GameAction("scratch-o hey", delegate { DJSchool.instance.ScratchoHey(eventCaller.currentEntity.beat, eventCaller.currentEntity.type); }, 3f, false, new List() {