This commit is contained in:
Rapandrasmus 2023-03-07 20:11:43 +01:00 committed by GitHub
parent 182d9fc88c
commit 0565f5ac7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -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++)

View file

@ -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();
}