From 8e9a2fc51520b91caf4e0a225cda4cb4ff939800 Mon Sep 17 00:00:00 2001
From: ThePurpleAnon <100617766+ThePurpleAnon@users.noreply.github.com>
Date: Sun, 28 Apr 2024 23:19:02 -0500
Subject: [PATCH] done coding frogge
---
Assets/Scripts/Games/FrogHop/FrogHop.cs | 39 +++++++++++++++++++++++++
1 file changed, 39 insertions(+)
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);