From 9d753b9ec26782e7352279b598ceb7452d94b604 Mon Sep 17 00:00:00 2001 From: AstrlJelly Date: Sun, 12 Nov 2023 15:37:05 -0500 Subject: [PATCH] oh okay that bug was really easy to fix --- Assets/Scripts/Games/CropStomp/CropStomp.cs | 12 +++++------- Assets/Scripts/Games/CropStomp/Veggie.cs | 5 ++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Assets/Scripts/Games/CropStomp/CropStomp.cs b/Assets/Scripts/Games/CropStomp/CropStomp.cs index 27c49deb1..c4bbd9a4a 100644 --- a/Assets/Scripts/Games/CropStomp/CropStomp.cs +++ b/Assets/Scripts/Games/CropStomp/CropStomp.cs @@ -135,9 +135,9 @@ namespace HeavenStudio.Games legsAnim.Play("LiftFront", 0, 1); // Start with leg up. - if (!Conductor.instance.isPlaying) { - OnGameSwitch(Conductor.instance.songPositionInBeatsAsDouble); - } + // if (!Conductor.instance.isPlaying) { + // OnGameSwitch(Conductor.instance.songPositionInBeatsAsDouble); + // } // Initialize vegetables. // var cond = Conductor.instance; @@ -244,8 +244,6 @@ namespace HeavenStudio.Games // } } - List cuedMoleSounds = new List(); - public override void OnGameSwitch(double beat) { double startBeat; @@ -394,7 +392,7 @@ namespace HeavenStudio.Games var grassPos = grassTrans.localPosition; var newGrassX = grassPos.x + (scrollRate * Time.deltaTime); - newGrassX = (newGrassX % (grassWidth * 4.5f)); + newGrassX %= grassWidth * 4.5f; grassTrans.localPosition = new Vector3(newGrassX, grassPos.y, grassPos.z); @@ -402,7 +400,7 @@ namespace HeavenStudio.Games var dotsPos = dotsTrans.localPosition; var newDotsX = dotsPos.x + (scrollRate * Time.deltaTime); - newDotsX = (newDotsX % dotsWidth); + newDotsX %= dotsWidth; dotsTrans.localPosition = new Vector3(newDotsX, dotsPos.y, dotsPos.z); } diff --git a/Assets/Scripts/Games/CropStomp/Veggie.cs b/Assets/Scripts/Games/CropStomp/Veggie.cs index 744b530cc..5947dcd2d 100644 --- a/Assets/Scripts/Games/CropStomp/Veggie.cs +++ b/Assets/Scripts/Games/CropStomp/Veggie.cs @@ -39,7 +39,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp { game = CropStomp.instance; - if (Conductor.instance.isPlaying) + // if (Conductor.instance.isPlaying) game.ScheduleInput(targetBeat - 1, 1f, CropStomp.InputAction_BasicPress, StompJust, StompMiss, Out); if (!isMole) @@ -56,8 +56,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp private bool gotStomped; // Safeguard in case nested Update() call breaks. private void Update() { - if (!game.isMarching) - return; + if (!game.isMarching) return; switch (veggieState) {