Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Mar 8, 2024
1 parent 3e8ffd5 commit 7982657
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions flixel/FlxState.hx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package flixel;

import flixel.group.FlxGroup;
import flixel.group.FlxContainer;
import flixel.util.FlxColor;
import flixel.util.FlxDestroyUtil;
import flixel.util.FlxSignal;
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.
Expand Down
6 changes: 3 additions & 3 deletions flixel/group/FlxSpriteContainer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FlxTypedSpriteContainer<T:FlxSprite> extends FlxTypedSpriteGroup<T>
override function initGroup(maxSize):Void
{
@:bypassAccessor
group = new FlxTypedContainer<T>(maxSize);
group = new SpriteContainer<T>(this, maxSize);
}

@:deprecated("FlxSpriteContainer.group can not be set")
Expand Down Expand Up @@ -66,11 +66,11 @@ private class SpriteContainer<T:FlxSprite> extends FlxTypedContainer<T>

override function getCamerasLegacy()
{
return parentSprite.getCamerasLegacy();
return (_cameras != null ? _cameras : parentSprite.getCamerasLegacy());
}

override function getCameras()
{
return parentSprite.getCameras();
return (_cameras != null ? _cameras : parentSprite.getCameras());
}
}

0 comments on commit 7982657

Please sign in to comment.