Skip to content

Commit 9762bff

Browse files
committed
Updated docs to specify callback parameter order (phaserjs#667)
1 parent 0198a77 commit 9762bff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/physics/arcade/World.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ Phaser.Physics.Arcade.prototype = {
378378
* @method Phaser.Physics.Arcade#collide
379379
* @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap.
380380
* @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap|array} object2 - The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap.
381-
* @param {function} [collideCallback=null] - An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them.
381+
* @param {function} [collideCallback=null] - An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them, unless you are colliding Group vs. Sprite, in which case Sprite will always be the first parameter.
382382
* @param {function} [processCallback=null] - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them.
383383
* @param {object} [callbackContext] - The context in which to run the callbacks.
384384
* @return {boolean} True if a collision occured otherwise false.

0 commit comments

Comments
 (0)