From 7dbda9fe624fdb5624921a131df1842a4d84230b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 27 Mar 2019 15:52:18 +0000 Subject: [PATCH] Added new arguments to method --- src/physics/arcade/components/Bounce.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/physics/arcade/components/Bounce.js b/src/physics/arcade/components/Bounce.js index 3e41a8824..70e533550 100644 --- a/src/physics/arcade/components/Bounce.js +++ b/src/physics/arcade/components/Bounce.js @@ -68,18 +68,22 @@ var Bounce = { }, /** - * Sets if this body should collide with the world bounds or not. + * Sets whether this Body collides with the world boundary. + * + * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first. * * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds * @since 3.0.0 * - * @param {boolean} value - `true` if this body should collide with the world bounds, otherwise `false`. + * @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`. + * @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value. + * @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value. * * @return {this} This Game Object. */ - setCollideWorldBounds: function (value) + setCollideWorldBounds: function (value, bounceX, bounceY) { - this.body.collideWorldBounds = value; + this.body.setCollideWorldBounds(value, bounceX, bounceY); return this; }