fix: Properly check if the state is busy or not for back button in Freeplay

This commit is contained in:
MoonDroid
2025-06-19 17:06:43 +07:00
parent 204501779d
commit cae7c8a785
@@ -1407,10 +1407,16 @@ class FreeplayState extends MusicBeatSubState
var allowPicoBulletsVibration:Bool = false;
var backTransitioning:Bool = false;
override function update(elapsed:Float):Void
{
super.update(elapsed);
#if FEATURE_TOUCH_CONTROLS
if (backButton != null && !backTransitioning) backButton.active = !busy;
#end
if (charSelectHint != null)
{
hintTimer += elapsed * 2;
@@ -1936,6 +1942,7 @@ class FreeplayState extends MusicBeatSubState
function goBack():Void
{
if (busy) return;
backTransitioning = true;
busy = true;
FlxTween.globalManager.clear();
FlxTimer.globalManager.clear();