diff --git a/Assets/Scripts/Games/FrogHop/FrogHop.cs b/Assets/Scripts/Games/FrogHop/FrogHop.cs index 146d39f01..828584226 100644 --- a/Assets/Scripts/Games/FrogHop/FrogHop.cs +++ b/Assets/Scripts/Games/FrogHop/FrogHop.cs @@ -199,6 +199,22 @@ namespace HeavenStudio.Games.Loaders }, defaultLength = 0.5f, }, + new GameAction("force", "Force Hop") + { + preFunction = delegate { + var e = eventCaller.currentEntity; + if (eventCaller.gameManager.minigameObj.TryGetComponent(out FrogHop instance)) { + instance.ForceHop(e.beat, e.length, e["front"], e["back"]); + } + }, + parameters = new List() + { + new Param("front", true, "Front Frogs", "Make the frogs in the front sing during this event."), + new Param("back", true, "Back Frogs", "Make the frogs in the back sing during this event."), + }, + resizable = true, + defaultLength = 4.0f, + }, new GameAction("pitching", "Enable Pitched Voices") { function = delegate { @@ -497,6 +513,29 @@ namespace HeavenStudio.Games usesGlobalePitch = enabled; } + public void ForceHop(double beat, double length, bool front, bool back) + { + var actions = new List(); + + for (int i = 0; i < length; i++) + { + if (front) + { + actions.Add(new BeatAction.Action(beat + i, delegate { NPCHop(FrontFrogs); })); + } + if (back) + { + actions.Add(new BeatAction.Action(beat + i, delegate { + NPCHop(BackFrogs); + SoundByte.PlayOneShotGame("frogHop/SE_NTR_FROG_EN_E_BEAT"); + })); + ScheduleInput(beat - 1, i + 1, InputAction_BasicPress, PlayerHopNormal, PlayerMiss, Nothing); + } + } + + BeatAction.New(this, actions); + } + public void TwoHop (double beat, bool spotlights, bool jumpinJazz, double start = 0) { CueCommon(beat, spotlights);