From dc3554e5a3a158aa18f302653ee2cb4b257e14ea Mon Sep 17 00:00:00 2001 From: George FunBook Date: Mon, 10 Apr 2023 17:52:26 -0500 Subject: [PATCH 1/3] flixel 5.3.0 compat --- .../effects/chainable/FlxEffectSprite.hx | 2 +- .../transition/FlxTransitionableState.hx | 37 +++++++------------ 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/flixel/addons/effects/chainable/FlxEffectSprite.hx b/flixel/addons/effects/chainable/FlxEffectSprite.hx index a91ec266..c62785fc 100644 --- a/flixel/addons/effects/chainable/FlxEffectSprite.hx +++ b/flixel/addons/effects/chainable/FlxEffectSprite.hx @@ -134,7 +134,7 @@ class FlxEffectSprite extends FlxSprite */ override public function update(elapsed:Float):Void { - if (updateTargetAnimation && target.animation.frames > 1) + if (updateTargetAnimation && target.animation.numFrames > 1) { target.updateAnimation(elapsed); } diff --git a/flixel/addons/transition/FlxTransitionableState.hx b/flixel/addons/transition/FlxTransitionableState.hx index f66a53ca..f298cc68 100644 --- a/flixel/addons/transition/FlxTransitionableState.hx +++ b/flixel/addons/transition/FlxTransitionableState.hx @@ -64,7 +64,7 @@ class FlxTransitionableState extends FlxState super(); } - override public function destroy():Void + override function destroy():Void { super.destroy(); transIn = null; @@ -72,36 +72,27 @@ class FlxTransitionableState extends FlxState _onExit = null; } - override public function create():Void + override function create():Void { super.create(); transitionIn(); } - override public function switchTo(nextState:FlxState):Bool + override function startOutro(onOutroComplete:() -> Void) { if (!hasTransOut) - return true; - - if (!_exiting) - transitionToState(nextState); - - return transOutFinished; - } - - function transitionToState(nextState:FlxState):Void - { - // play the exit transition, and when it's done call FlxG.switchState - _exiting = true; - transitionOut(function() - { - FlxG.switchState(nextState); - }); - - if (skipNextTransOut) + onOutroComplete(); + else if (!_exiting) { - skipNextTransOut = false; - finishTransOut(); + // play the exit transition, and when it's done call FlxG.switchState + _exiting = true; + transitionOut(onOutroComplete); + + if (skipNextTransOut) + { + skipNextTransOut = false; + finishTransOut(); + } } } From dd95a49bd9a3b94db12fdd67d7475b6dfad02efc Mon Sep 17 00:00:00 2001 From: George FunBook Date: Tue, 11 Apr 2023 10:46:17 -0500 Subject: [PATCH 2/3] use new sound package --- flixel/addons/weapon/FlxWeapon.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flixel/addons/weapon/FlxWeapon.hx b/flixel/addons/weapon/FlxWeapon.hx index 657e3433..8cd0bc86 100644 --- a/flixel/addons/weapon/FlxWeapon.hx +++ b/flixel/addons/weapon/FlxWeapon.hx @@ -12,7 +12,7 @@ import flixel.math.FlxPoint; import flixel.math.FlxRandom; import flixel.math.FlxRect; import flixel.math.FlxVelocity; -import flixel.system.FlxSound; +import flixel.sound.FlxSound; import flixel.tile.FlxTilemap; import flixel.util.helpers.FlxBounds; import flixel.util.helpers.FlxRange; From e1049decadf98d8903afdf2899f0473a2400a92e Mon Sep 17 00:00:00 2001 From: George FunBook Date: Tue, 11 Apr 2023 10:46:53 -0500 Subject: [PATCH 3/3] ditto --- flixel/addons/text/FlxTypeText.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flixel/addons/text/FlxTypeText.hx b/flixel/addons/text/FlxTypeText.hx index 7ba3b9a0..4a5ef649 100644 --- a/flixel/addons/text/FlxTypeText.hx +++ b/flixel/addons/text/FlxTypeText.hx @@ -5,7 +5,7 @@ import flixel.input.keyboard.FlxKey; import flixel.math.FlxMath; import flixel.system.FlxAssets; import flixel.text.FlxText; -import flixel.system.FlxSound; +import flixel.sound.FlxSound; import flixel.math.FlxRandom; import flash.media.Sound;