From 101fca06f451bc5241b2197ea4cb9d57bdfe1a06 Mon Sep 17 00:00:00 2001 From: ThePurpleAnon <100617766+ThePurpleAnon@users.noreply.github.com> Date: Fri, 26 Apr 2024 21:43:11 -0500 Subject: [PATCH] sounds are working i mean le frogge --- Assets/Scripts/Games/FrogHop/FrogHop.cs | 29 ++++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Games/FrogHop/FrogHop.cs b/Assets/Scripts/Games/FrogHop/FrogHop.cs index 96ad42ff3..c6e1dc013 100644 --- a/Assets/Scripts/Games/FrogHop/FrogHop.cs +++ b/Assets/Scripts/Games/FrogHop/FrogHop.cs @@ -16,7 +16,7 @@ namespace HeavenStudio.Games.Loaders { public static Minigame AddGame(EventCaller eventCaller) { - return new Minigame("FrogHop", "Frog Hop", "ffffff", false, false, new List() + return new Minigame("frogHop", "Frog Hop", "ffffff", false, false, new List() { new GameAction("bop", "Bop") { @@ -289,7 +289,7 @@ namespace HeavenStudio.Games betweenHopValues = hop + 1 < startRegularHop && hop + 1 >= startBackHop; if (!betweenHopValues) actions.Add(new BeatAction.Action(hop + 1, delegate { betweenHopValues = hop + 1 < startRegularHop && hop + 1 >= startBackHop; - if (!betweenHopValues) NPCHop(FrontFrogs); + if (!betweenHopValues) { NPCHop(FrontFrogs); SoundByte.PlayOneShotGame("frogHop/SE_NTR_FROG_EN_E_BEAT"); } })); if (keepHopping) actions.Add(new BeatAction.Action(hop, delegate { queuedHops.Add(hop + 1); })); @@ -348,7 +348,7 @@ namespace HeavenStudio.Games sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_COUNT4", beat + 3.0)); BeatAction.New(this, actions); - MultiSound.Play(sounds.ToArray()); + MultiSound.Play(sounds); if (start) Hop(beat + 4.0); } @@ -384,7 +384,7 @@ namespace HeavenStudio.Games ScheduleInput(beat, 2.5, InputAction_BasicPress, PlayerHopHoo, PlayerMiss, Nothing); BeatAction.New(this, actions); - MultiSound.Play(sounds.ToArray()); + MultiSound.Play(sounds); } public void ThreeHop (double beat, bool spotlights) @@ -419,7 +419,7 @@ namespace HeavenStudio.Games ScheduleInput(beat, 3.0, InputAction_BasicPress, PlayerHopYeahAccent, PlayerMiss, Nothing); BeatAction.New(this, actions); - MultiSound.Play(sounds.ToArray()); + MultiSound.Play(sounds); } public void SpinItBoys (double beat, bool spotlights) @@ -432,17 +432,25 @@ namespace HeavenStudio.Games //call actions.Add(new(beat + 0.0, delegate { NPCCharge(FrontFrogs); Talk(new List() { LeaderFrog }, "Narrow", beat); })); actions.Add(new(beat + 1.0, delegate { NPCSpin(FrontFrogs); Talk(new List() { LeaderFrog }, "Wide", beat); })); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_T_KURU_1", beat)); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_T_KURU_2", beat + 0.5)); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_T_LIN", beat + 1.0)); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_T_SPIN", beat + 1.0)); //response actions.Add(new(beat + 2.0, delegate { NPCCharge(BackFrogs); Talk(BackFrogs, "Narrow", beat); })); actions.Add(new(beat + 3.0, delegate { NPCSpin(BackFrogs); Talk(BackFrogs, "Wide", beat); })); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_E_KURU_1", beat + 2.0)); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_E_KURU_2", beat + 2.5)); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_E_LIN", beat + 3.0)); + sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_E_SPIN", beat + 3.0)); //inputs ScheduleInput(beat, 2.0, InputAction_AltPress, PlayerHopCharge, PlayerMiss, Nothing); ScheduleInput(beat, 3.0, InputAction_AltRelease, PlayerSpin, PlayerMiss, Nothing); BeatAction.New(this, actions); - MultiSound.Play(sounds.ToArray()); + MultiSound.Play(sounds); } public void CueCommon(double beat, bool spotlights = true) @@ -526,12 +534,21 @@ namespace HeavenStudio.Games public void PlayerHopCharge(PlayerActionEvent caller, float state) { + double beat = caller.startBeat + caller.timer; + + MultiSound.Play(new MultiSound.Sound[] + { + new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_P_KURU_1", beat), + new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_P_KURU_2", beat + 0.5) + }); + globalAnimSide *= -1; PlayerFrog.Charge(globalAnimSide); } public void PlayerSpin(PlayerActionEvent caller, float state) { + SoundByte.PlayOneShotGame("frogHop/SE_NTR_FROG_EN_P_LIN"); PlayerFrog.Spin(); }