Skip to content

Commit 7aa8f02

Browse files
committed
Add onWorldBounds arg in setCollideWorldBounds()
1 parent af27284 commit 7aa8f02

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/physics/arcade/Body.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,10 +1695,11 @@ var Body = new Class({
16951695
* @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`.
16961696
* @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value.
16971697
* @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value.
1698+
* @param {boolean} [onWorldBounds] - If given this replaces the Body's `onWorldBounds` value.
16981699
*
16991700
* @return {Phaser.Physics.Arcade.Body} This Body object.
17001701
*/
1701-
setCollideWorldBounds: function (value, bounceX, bounceY)
1702+
setCollideWorldBounds: function (value, bounceX, bounceY, onWorldBounds)
17021703
{
17031704
if (value === undefined) { value = true; }
17041705

@@ -1725,6 +1726,11 @@ var Body = new Class({
17251726
}
17261727
}
17271728

1729+
if (onWorldBounds !== undefined)
1730+
{
1731+
this.onWorldBounds = onWorldBounds;
1732+
}
1733+
17281734
return this;
17291735
},
17301736

0 commit comments

Comments
 (0)