This commit is contained in:
Rapandrasmus 2023-03-07 20:11:43 +01:00 committed by GitHub
parent 80d8a0731b
commit ee42142835
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) 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) if (toggle)
{ {
for (int i = 0; i < length; i++) for (int i = 0; i < length; i++)

View File

@ -13,7 +13,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan
public Animator anim; public Animator anim;
public Animator FaceAnim; public Animator FaceAnim;
public GameEvent bop = new GameEvent(); public GameEvent bop = new GameEvent();
public bool shouldBop = true;
public SpriteRenderer[] Shadows; public SpriteRenderer[] Shadows;
public Color BombGlowTint; public Color BombGlowTint;
@ -95,7 +94,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
anim.Play("Beat", -1, 0); 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(); Bop();
} }