Add Group to param type in Arcade collide/overlap

This commit is contained in:
Thomas Tan 2018-05-22 10:11:15 +08:00
parent 3589b95bbd
commit 806b5981b0
No known key found for this signature in database
GPG key ID: A040BC34D269C351
3 changed files with 20 additions and 20 deletions

View file

@ -17,8 +17,8 @@ var Class = require('../../utils/Class');
* *
* @param {Phaser.Physics.Arcade.World} world - [description] * @param {Phaser.Physics.Arcade.World} world - [description]
* @param {boolean} overlapOnly - [description] * @param {boolean} overlapOnly - [description]
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object1 - The first object to check for collision. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for collision.
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object2 - The second object to check for collision. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for collision.
* @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide. * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.
* @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean. * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.
* @param {object} callbackContext - The scope in which to call the callbacks. * @param {object} callbackContext - The scope in which to call the callbacks.

View file

@ -63,8 +63,8 @@ var Factory = new Class({
* @method Phaser.Physics.Arcade.Factory#collider * @method Phaser.Physics.Arcade.Factory#collider
* @since 3.0.0 * @since 3.0.0
* *
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object1 - The first object to check for collision. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for collision.
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object2 - The second object to check for collision. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for collision.
* @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide. * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.
* @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean. * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.
* @param {*} [callbackContext] - The scope in which to call the callbacks. * @param {*} [callbackContext] - The scope in which to call the callbacks.
@ -82,8 +82,8 @@ var Factory = new Class({
* @method Phaser.Physics.Arcade.Factory#overlap * @method Phaser.Physics.Arcade.Factory#overlap
* @since 3.0.0 * @since 3.0.0
* *
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object1 - The first object to check for overlap. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for overlap.
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object2 - The second object to check for overlap. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for overlap.
* @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide. * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.
* @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean. * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.
* @param {*} [callbackContext] - The scope in which to call the callbacks. * @param {*} [callbackContext] - The scope in which to call the callbacks.

View file

@ -364,7 +364,7 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#enable * @method Phaser.Physics.Arcade.World#enable
* @since 3.0.0 * @since 3.0.0
* *
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object - [description] * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - [description]
* @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`. * @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.
*/ */
enable: function (object, bodyType) enable: function (object, bodyType)
@ -454,7 +454,7 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#disable * @method Phaser.Physics.Arcade.World#disable
* @since 3.0.0 * @since 3.0.0
* *
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object - [description] * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - [description]
*/ */
disable: function (object) disable: function (object)
{ {
@ -664,8 +664,8 @@ var World = new Class({
* @since 3.0.0 * @since 3.0.0
* @see Phaser.Physics.Arcade.World#collide * @see Phaser.Physics.Arcade.World#collide
* *
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object1 - The first object to check for collision. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for collision.
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object2 - The second object to check for collision. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for collision.
* @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide. * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.
* @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean. * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.
* @param {*} [callbackContext] - The scope in which to call the callbacks. * @param {*} [callbackContext] - The scope in which to call the callbacks.
@ -691,8 +691,8 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#addOverlap * @method Phaser.Physics.Arcade.World#addOverlap
* @since 3.0.0 * @since 3.0.0
* *
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object1 - The first object to check for overlap. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for overlap.
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object2 - The second object to check for overlap. * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for overlap.
* @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects overlap. * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects overlap.
* @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects overlap. Must return a boolean. * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects overlap. Must return a boolean.
* @param {*} [callbackContext] - The scope in which to call the callbacks. * @param {*} [callbackContext] - The scope in which to call the callbacks.
@ -1352,8 +1352,8 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#overlap * @method Phaser.Physics.Arcade.World#overlap
* @since 3.0.0 * @since 3.0.0
* *
* @param {Phaser.GameObjects.GameObject} object1 - [description] * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.Group} object1 - [description]
* @param {Phaser.GameObjects.GameObject} object2 - [description] * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.Group} object2 - [description]
* @param {ArcadePhysicsCallback} [overlapCallback] - [description] * @param {ArcadePhysicsCallback} [overlapCallback] - [description]
* @param {ArcadePhysicsCallback} [processCallback] - [description] * @param {ArcadePhysicsCallback} [processCallback] - [description]
* @param {*} [callbackContext] - [description] * @param {*} [callbackContext] - [description]
@ -1375,8 +1375,8 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#collide * @method Phaser.Physics.Arcade.World#collide
* @since 3.0.0 * @since 3.0.0
* *
* @param {Phaser.GameObjects.GameObject} object1 - [description] * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.Group} object1 - [description]
* @param {Phaser.GameObjects.GameObject} object2 - [description] * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.Group} object2 - [description]
* @param {ArcadePhysicsCallback} [collideCallback] - [description] * @param {ArcadePhysicsCallback} [collideCallback] - [description]
* @param {ArcadePhysicsCallback} [processCallback] - [description] * @param {ArcadePhysicsCallback} [processCallback] - [description]
* @param {*} [callbackContext] - [description] * @param {*} [callbackContext] - [description]
@ -1398,8 +1398,8 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#collideObjects * @method Phaser.Physics.Arcade.World#collideObjects
* @since 3.0.0 * @since 3.0.0
* *
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object1 - [description] * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - [description]
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} object2 - [description] * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - [description]
* @param {ArcadePhysicsCallback} collideCallback - [description] * @param {ArcadePhysicsCallback} collideCallback - [description]
* @param {ArcadePhysicsCallback} processCallback - [description] * @param {ArcadePhysicsCallback} processCallback - [description]
* @param {*} callbackContext - [description] * @param {*} callbackContext - [description]
@ -1468,8 +1468,8 @@ var World = new Class({
* @method Phaser.Physics.Arcade.World#collideHandler * @method Phaser.Physics.Arcade.World#collideHandler
* @since 3.0.0 * @since 3.0.0
* *
* @param {Phaser.GameObjects.GameObject} object1 - [description] * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.Group} object1 - [description]
* @param {Phaser.GameObjects.GameObject} object2 - [description] * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.Group} object2 - [description]
* @param {ArcadePhysicsCallback} collideCallback - [description] * @param {ArcadePhysicsCallback} collideCallback - [description]
* @param {ArcadePhysicsCallback} processCallback - [description] * @param {ArcadePhysicsCallback} processCallback - [description]
* @param {*} callbackContext - [description] * @param {*} callbackContext - [description]