You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -145,31 +146,20 @@ var ArcadePhysics = new Class({
145
146
},
146
147
147
148
/**
148
-
* Checks for overlaps between two Game Objects. The objects can be any Game Object that have an Arcade Physics Body.
149
-
*
150
-
* Unlike {@link #collide} the objects are NOT automatically separated or have any physics applied, they merely test for overlap results.
151
-
*
152
-
* Both the first and second parameter can be arrays of objects, of differing types.
153
-
* If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter.
154
-
*
155
-
* ##### Tilemaps
156
-
*
157
-
* Any overlapping tiles, including blank/null tiles, will give a positive result. Tiles marked via {@link Phaser.Tilemap#setCollision} (and similar methods) have no special status, and callbacks added via {@link Phaser.Tilemap#setTileIndexCallback} or {@link Phaser.Tilemap#setTileLocationCallback} are not invoked. So calling this method without any callbacks isn't very useful.
158
-
*
159
-
* If you're interested only in whether an object overlaps a certain tile or class of tiles, filter the tiles with `processCallback` and then use the result returned by this method. Blank/null tiles can be excluded by their {@link Phaser.Tile#index index} (-1).
160
-
*
161
-
* If you want to take action on certain overlaps, examine the tiles in `collideCallback` and then handle as you like.
149
+
* Tests if Game Objects overlap. See {@link Phaser.Physics.Arcade.World#overlap}
* @param {(Phaser.GameObjects.GameObject|array)} object1 - The first object or array of objects to check. Can be any Game Object that has an Arcade Physics Body.
167
-
* @param {(Phaser.GameObjects.GameObject|array)} object2 - The second object or array of objects to check. Can be any Game Object that has an Arcade Physics Body.
168
-
* @param {ArcadePhysicsCallback} [overlapCallback=null] - An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them, unless you are checking Group vs. Sprite, in which case Sprite will always be the first parameter.
169
-
* @param {ArcadePhysicsCallback} [processCallback=null] - A 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`.
154
+
* @param {ArcadeColliderType} object1 - The first object or array of objects to check.
155
+
* @param {ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.
156
+
* @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.
157
+
* @param {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`.
170
158
* @param {*} [callbackContext] - The context in which to run the callbacks.
171
159
*
172
-
* @return {boolean} True if an overlap occurred otherwise false.
160
+
* @return {boolean} True if at least one Game Object overlaps another.
* @param {(Phaser.GameObjects.GameObject|array)} object1 - The first object or array of objects to check. Can be any Game Object that has an Arcade Physics Body.
190
-
* @param {(Phaser.GameObjects.GameObject|array)} object2 - The second object or array of objects to check. Can be any Game Object that has an Arcade Physics Body.
191
-
* @param {ArcadePhysicsCallback} [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 checking Group vs. Sprite, in which case Sprite will always be the first parameter.
192
-
* @param {ArcadePhysicsCallback} [processCallback=null] - A 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`.
179
+
* @param {ArcadeColliderType} object1 - The first object or array of objects to check.
180
+
* @param {ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.
181
+
* @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.
182
+
* @param {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`.
193
183
* @param {*} [callbackContext] - The context in which to run the callbacks.
194
184
*
195
-
* @return {boolean} True if a collision occurred otherwise false.
185
+
* @return {boolean} True if any overlapping Game Objects were separated, otherwise false.
0 commit comments