mirror of
https://github.com/wassname/phaser.git
synced 2026-08-14 12:40:17 +08:00
The way the collision process callback works has changed significantly and now works as originally intended.
The World level quadtree is no longer created, they are now built and ripped down each time you collide a Group, this helps collision accuracy. Bodies are no longer added to a world quadtree, so have had all of their quadtree properties removed such as skipQuadtree, quadTreeIndex, etc. QuadTree.populate - you can pass it a Group and it'll automatically insert all of the children ready for inspection. Removed ArcadePhysics binding to the QuadTree, so it can now be used independantly of the physics system.
This commit is contained in:
@@ -963,6 +963,7 @@ Phaser.Group.prototype = {
|
||||
* Allows you to call your own function on each member of this Group. You must pass the callback and context in which it will run.
|
||||
* After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child.
|
||||
* For example: Group.forEach(awardBonusGold, this, true, 100, 500)
|
||||
* Note: Currently this will skip any children which are Groups themselves.
|
||||
*
|
||||
* @method Phaser.Group#forEach
|
||||
* @param {function} callback - The function that will be called. Each child of the Group will be passed to it as its first parameter.
|
||||
|
||||
Reference in New Issue
Block a user