FlxSprite#overlap and FlxSprite#overlapAt only check the first element of a FlxGroup #223

wants to merge 1 commit into


None yet

2 participants


It seems the code uses the wrong length variable. The one that is used is always 1, so it will only check the first element of the FlxGroup. This patch uses the length attribute of the FlxGroup object and fixes the behaviour.

@rogerbraun rogerbraun Fix bug in #overlaps and #overlapsAt that would lead to only the firs…
…t element of a FlxGroup being checked by using the wrong length variable.

I noticed this too. It seems like it would be a good idea to also add a check if ObjectOrGroup is null, since it's possible to get null objects from the FlxGroup members list.

@rogerbraun rogerbraun closed this Feb 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment