From 79826576b01e1c0aaee5c047fd0ed8b4cf92aba0 Mon Sep 17 00:00:00 2001 From: George FunBook Date: Fri, 8 Mar 2024 16:23:31 -0600 Subject: [PATCH] more fixes --- flixel/FlxState.hx | 6 +++--- flixel/group/FlxSpriteContainer.hx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flixel/FlxState.hx b/flixel/FlxState.hx index 24051dad25..f3835db19f 100644 --- a/flixel/FlxState.hx +++ b/flixel/FlxState.hx @@ -1,6 +1,6 @@ package flixel; -import flixel.group.FlxGroup; +import flixel.group.FlxContainer; import flixel.util.FlxColor; import flixel.util.FlxDestroyUtil; import flixel.util.FlxSignal; @@ -8,14 +8,14 @@ import flixel.util.typeLimit.NextState; /** * This is the basic game "state" object - e.g. in a simple game you might have a menu state and a play state. - * It is for all intents and purpose a fancy `FlxGroup`. And really, it's not even that fancy. + * It is for all intents and purpose a fancy `FlxContainer`. And really, it's not even that fancy. */ @:keepSub // workaround for HaxeFoundation/haxe#3749 #if FLX_NO_UNIT_TEST @:autoBuild(flixel.system.macros.FlxMacroUtil.deprecateOverride("switchTo", "switchTo is deprecated, use startOutro")) #end // show deprecation warning when `switchTo` is overriden in dereived classes -class FlxState extends FlxGroup +class FlxState extends FlxContainer { /** * Determines whether or not this state is updated even when it is not the active state. diff --git a/flixel/group/FlxSpriteContainer.hx b/flixel/group/FlxSpriteContainer.hx index d489b0d192..fad552356b 100644 --- a/flixel/group/FlxSpriteContainer.hx +++ b/flixel/group/FlxSpriteContainer.hx @@ -34,7 +34,7 @@ class FlxTypedSpriteContainer extends FlxTypedSpriteGroup override function initGroup(maxSize):Void { @:bypassAccessor - group = new FlxTypedContainer(maxSize); + group = new SpriteContainer(this, maxSize); } @:deprecated("FlxSpriteContainer.group can not be set") @@ -66,11 +66,11 @@ private class SpriteContainer extends FlxTypedContainer override function getCamerasLegacy() { - return parentSprite.getCamerasLegacy(); + return (_cameras != null ? _cameras : parentSprite.getCamerasLegacy()); } override function getCameras() { - return parentSprite.getCameras(); + return (_cameras != null ? _cameras : parentSprite.getCameras()); } }