run checks if timer's running

This commit is contained in:
Kolo
2025-06-06 21:10:03 -04:00
committed by Eric
parent b008f88e0d
commit 63eca96c98
+9 -2
View File
@@ -196,6 +196,11 @@ class PlayState extends MusicBeatSubState
*/
public var needsReset:Bool = false;
/**
* A timer that gets active once resetting happens. Used to vwoosh in notes.
*/
public var vwooshTimer:FlxTimer = new FlxTimer();
/**
* The current 'Blueball Counter' to display in the pause menu.
* Resets when you beat a song or go back to the main menu.
@@ -866,7 +871,7 @@ class PlayState extends MusicBeatSubState
public override function update(elapsed:Float):Void
{
if (criticalFailure) return;
if (criticalFailure || vwooshTimer.active) return;
super.update(elapsed);
@@ -950,7 +955,6 @@ class PlayState extends MusicBeatSubState
songScore = 0;
Highscore.tallies.combo = 0;
// timer for vwoosh
var vwooshTimer = new FlxTimer();
vwooshTimer.start(0.5, function(t:FlxTimer) {
Conductor.instance.update(startTimestamp - Conductor.instance.combinedOffset, false);
if (playerStrumline.notes.length == 0) playerStrumline.updateNotes();
@@ -964,6 +968,9 @@ class PlayState extends MusicBeatSubState
currentStage?.getBoyfriend()?.initHealthIcon(false);
currentStage?.getDad()?.initHealthIcon(true);
// Stops any existing countdown.
Countdown.stopCountdown();
needsReset = false;
}