From ee4214283571fc9a3c2c9b26dc680011826fcde4 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Tue, 7 Mar 2023 20:11:43 +0100 Subject: [PATCH] FIXED!!! (#332) --- Assets/Scripts/Games/KarateMan/KarateMan.cs | 5 ++++- Assets/Scripts/Games/KarateMan/KarateManJoe.cs | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Games/KarateMan/KarateMan.cs b/Assets/Scripts/Games/KarateMan/KarateMan.cs index da31668f..bc9a1446 100644 --- a/Assets/Scripts/Games/KarateMan/KarateMan.cs +++ b/Assets/Scripts/Games/KarateMan/KarateMan.cs @@ -1036,7 +1036,10 @@ namespace HeavenStudio.Games public void ToggleBop(float beat, float length, bool toggle, bool autoBop) { - Joe.shouldBop = autoBop; + if (autoBop) + Joe.bop.length = Single.MaxValue; + else + Joe.bop.length = 0; if (toggle) { for (int i = 0; i < length; i++) diff --git a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs index bd68c01b..ddabb181 100644 --- a/Assets/Scripts/Games/KarateMan/KarateManJoe.cs +++ b/Assets/Scripts/Games/KarateMan/KarateManJoe.cs @@ -13,7 +13,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan public Animator anim; public Animator FaceAnim; public GameEvent bop = new GameEvent(); - public bool shouldBop = true; public SpriteRenderer[] Shadows; public Color BombGlowTint; @@ -95,7 +94,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan anim.Play("Beat", -1, 0); } - if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1, false) && shouldBop && cond.songPositionInBeats >= unPrepareTime && !inCombo) + if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1, false) && cond.songPositionInBeats > bop.startBeat && cond.songPositionInBeats < bop.startBeat + bop.length && cond.songPositionInBeats >= unPrepareTime && !inCombo) { Bop(); }