mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Merge pull request #4070 from samme/feature/arcade-group-config-enable
Add PhysicsGroupConfig.enable, Arcade.Body#setEnable()
This commit is contained in:
commit
a9938baec6
2 changed files with 22 additions and 0 deletions
|
@ -1955,6 +1955,25 @@ var Body = new Class({
|
|||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the Body's `enable` property.
|
||||
*
|
||||
* @method Phaser.Physics.Arcade.Body#setEnable
|
||||
* @since 3.14.0
|
||||
*
|
||||
* @param {boolean} [value=true] - The value to assign to `enable`.
|
||||
*
|
||||
* @return {Phaser.Physics.Arcade.Body} This Body object.
|
||||
*/
|
||||
setEnable: function (value)
|
||||
{
|
||||
if (value === undefined) { value = true; }
|
||||
|
||||
this.enable = value;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* The Body's horizontal position (left edge).
|
||||
*
|
||||
|
|
|
@ -25,6 +25,7 @@ var IsPlainObject = require('../../utils/object/IsPlainObject');
|
|||
* @property {number} [bounceY=0] - Sets {@link Phaser.Physics.Arcade.Body#bounce bounce.y}.
|
||||
* @property {number} [dragX=0] - Sets {@link Phaser.Physics.Arcade.Body#drag drag.x}.
|
||||
* @property {number} [dragY=0] - Sets {@link Phaser.Physics.Arcade.Body#drag drag.y}.
|
||||
* @property {boolean} [enable=true] - Sets {@link Phaser.Physics.Arcade.Body#enable enable}.
|
||||
* @property {number} [gravityX=0] - Sets {@link Phaser.Physics.Arcade.Body#gravity gravity.x}.
|
||||
* @property {number} [gravityY=0] - Sets {@link Phaser.Physics.Arcade.Body#gravity gravity.y}.
|
||||
* @property {number} [frictionX=0] - Sets {@link Phaser.Physics.Arcade.Body#friction friction.x}.
|
||||
|
@ -51,6 +52,7 @@ var IsPlainObject = require('../../utils/object/IsPlainObject');
|
|||
* @property {number} setBounceY - As {@link Phaser.Physics.Arcade.Body#setBounceY}.
|
||||
* @property {number} setDragX - As {@link Phaser.Physics.Arcade.Body#setDragX}.
|
||||
* @property {number} setDragY - As {@link Phaser.Physics.Arcade.Body#setDragY}.
|
||||
* @property {boolean} setEnable - As {@link Phaser.Physics.Arcade.Body#setEnable}.
|
||||
* @property {number} setGravityX - As {@link Phaser.Physics.Arcade.Body#setGravityX}.
|
||||
* @property {number} setGravityY - As {@link Phaser.Physics.Arcade.Body#setGravityY}.
|
||||
* @property {number} setFrictionX - As {@link Phaser.Physics.Arcade.Body#setFrictionX}.
|
||||
|
@ -167,6 +169,7 @@ var PhysicsGroup = new Class({
|
|||
setBounceY: GetFastValue(config, 'bounceY', 0),
|
||||
setDragX: GetFastValue(config, 'dragX', 0),
|
||||
setDragY: GetFastValue(config, 'dragY', 0),
|
||||
setEnable: GetFastValue(config, 'enable', true),
|
||||
setGravityX: GetFastValue(config, 'gravityX', 0),
|
||||
setGravityY: GetFastValue(config, 'gravityY', 0),
|
||||
setFrictionX: GetFastValue(config, 'frictionX', 0),
|
||||
|
|
Loading…
Reference in a new issue