Scope: static
Source: src/physics/arcade/components/Acceleration.js#L7
Since: 3.0.0
Static functions
setAcceleration
<instance> setAcceleration(x, [y])
Description:
Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.
Parameters:
name | type | optional | default | description |
---|---|---|---|---|
x | number | No | The horizontal acceleration | |
y | number | Yes | "x" | The vertical acceleration |
Returns: Phaser.Physics.Arcade.Components.Acceleration - This Game Object.
Source: src/physics/arcade/components/Acceleration.js#L15
Since: 3.0.0
setAccelerationX
<instance> setAccelerationX(value)
Description:
Sets the body's horizontal acceleration.
Parameters:
name | type | optional | description |
---|---|---|---|
value | number | No | The horizontal acceleration |
Returns: Phaser.Physics.Arcade.Components.Acceleration - This Game Object.
Source: src/physics/arcade/components/Acceleration.js#L33
Since: 3.0.0
setAccelerationY
<instance> setAccelerationY(value)
Description:
Sets the body's vertical acceleration.
Parameters:
name | type | optional | description |
---|---|---|---|
value | number | No | The vertical acceleration |
Returns: Phaser.Physics.Arcade.Components.Acceleration - This Game Object.
Source: src/physics/arcade/components/Acceleration.js#L50
Since: 3.0.0