mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Added new arguments to method
This commit is contained in:
parent
28b41254ba
commit
7dbda9fe62
1 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue