Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Adding method updateTouchingFlags to FlxObject, closes #1556 #1555

Merged
merged 1 commit into from
Jul 8, 2015
Merged

- Adding method updateTouchingFlags to FlxObject, closes #1556 #1555

merged 1 commit into from
Jul 8, 2015

Conversation

winterismute
Copy link
Contributor

When a "collide" call is performed, flixel updates the flags of the objects to signal where they touched something in the 4 directions. This does not happen when an overlap call is issued, because updating the flags is performed inside the separate methods.
This pull request changes this, and allows to write

FlxG.overlap(obj1, obj2, hittingObjects, FlxObject.updateTouchingFlags);

and having the "touching" variables of obj1 and obj2 updated when reaching the function "hittingObjects".

@Gama11 Gama11 changed the title - Adding method updateTouchingFlags to FlxObject - Adding method updateTouchingFlags to FlxObject, closes #1556 Jul 8, 2015
@Gama11
Copy link
Member

Gama11 commented Jul 8, 2015

Thanks for this awesome change! Not only does it allow the logic to be used in other scenarios like you described, it also makes it a lot more readable since it's now split up into smaller functions. 👍

Gama11 added a commit that referenced this pull request Jul 8, 2015
- Adding method updateTouchingFlags to FlxObject, closes #1556
@Gama11 Gama11 merged commit 93e25e4 into HaxeFlixel:dev Jul 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants