Skip to content

Commit 3dcc2fd

Browse files
use overlapCallback for overlap named methods
1 parent 623382c commit 3dcc2fd

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/physics/arcade/ArcadePhysics.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ var ArcadePhysics = new Class({
230230
* @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.
231231
* @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.
232232
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the objects overlap.
233-
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `collideCallback` will only be called if this callback returns `true`.
233+
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.
234234
* @param {*} [callbackContext] - The context in which to run the callbacks.
235235
*
236236
* @return {boolean} True if at least one Game Object overlaps another.
@@ -338,15 +338,15 @@ var ArcadePhysics = new Class({
338338
*
339339
* @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.
340340
* @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.
341-
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.
342-
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.
341+
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the objects overlap.
342+
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `overlapCallback` will only be called if this callback returns `true`.
343343
* @param {any} [callbackContext] - The context in which to run the callbacks.
344344
*
345345
* @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.
346346
*/
347-
overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)
347+
overlapTiles: function (sprite, tiles, overlapCallback, processCallback, callbackContext)
348348
{
349-
return this.world.overlapTiles(sprite, tiles, collideCallback, processCallback, callbackContext);
349+
return this.world.overlapTiles(sprite, tiles, overlapCallback, processCallback, callbackContext);
350350
},
351351

352352
/**

src/physics/arcade/World.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -2254,21 +2254,21 @@ var World = new Class({
22542254
*
22552255
* @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.
22562256
* @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.
2257-
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.
2258-
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.
2257+
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the objects overlap.
2258+
* @param {Phaser.Types.Physics.Arcade.ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `overlapCallback` will only be called if this callback returns `true`.
22592259
* @param {any} [callbackContext] - The context in which to run the callbacks.
22602260
*
22612261
* @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.
22622262
*/
2263-
overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)
2263+
overlapTiles: function (sprite, tiles, overlapCallback, processCallback, callbackContext)
22642264
{
22652265
if (tiles.length === 0 || (sprite.body && !sprite.body.enable) || (sprite.isBody && !sprite.enable))
22662266
{
22672267
return false;
22682268
}
22692269
else
22702270
{
2271-
return this.collideSpriteVsTilesHandler(sprite, tiles, collideCallback, processCallback, callbackContext, true, false);
2271+
return this.collideSpriteVsTilesHandler(sprite, tiles, overlapCallback, processCallback, callbackContext, true, false);
22722272
}
22732273
},
22742274

0 commit comments

Comments
 (0)