Remove exists check when calling FlxSpriteGroup.multiTransformChildren#3501
Remove exists check when calling FlxSpriteGroup.multiTransformChildren#3501DetectiveBaldi wants to merge 1 commit intoHaxeFlixel:devfrom
FlxSpriteGroup.multiTransformChildren#3501Conversation
FlxSpriteGroup.multiTransformChildren
|
It makes 1000% sense to make this change but we just can't change fundamental behavior like this. This is a breaking change so you'll need to extend the class and override this behavior yourself. Eventually, the plan is to change how the draw tree works, and make spriteGroups/spriteContainers obsolete in favor of some new version. Even if we do approve this change there's no good way to broadcast this change to people who are expecting the old behavior Side note: you shouldn't ever use FlxSpriteGroup, use FlxSpriteContainers. Edit: here's what I typically do in my games: |
Yeah, I can see how it would be almost impossible to communicate this change to developers. Thank you for the git gist, I can most likely work with something like this for the time being |
|
One option for communication is what we did for |
Prior to removing this check, killing a group object, and then updating the group position caused some strange behavior, which can be recreated through this sample:
At first glance this check makes sense, don't transform objects that don't exist. But I feel like this check falls under the category of premature optimization and it caused me a really aggravating hour long debug session trying to figure out why my sprite group objects weren't updating positions.
I'm not sure if this will be accepted considering the current status and seemingly pending removal of FlxSpriteGroup, but I'd rather not migrate all my code to use some extension or alternative class and I feel like it makes sense to just push it here