phaser/src/physics/impact/components/Acceleration.js

65 lines
1.2 KiB
JavaScript
Raw Normal View History

/**
* [description]
*
* @name Phaser.Physics.Impact.Components.Acceleration
* @since 3.0.0
*/
2017-08-15 22:36:00 +00:00
var Acceleration = {
/**
* [description]
*
* @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationX
* @since 3.0.0
*
* @param {[type]} x - [description]
*
* @return {[type]} [description]
*/
2017-08-15 22:36:00 +00:00
setAccelerationX: function (x)
{
this.accel.x = x;
return this;
},
/**
* [description]
*
* @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationY
* @since 3.0.0
*
* @param {[type]} y - [description]
*
* @return {[type]} [description]
*/
2017-08-15 22:36:00 +00:00
setAccelerationY: function (y)
{
this.accel.y = y;
return this;
},
/**
* [description]
*
* @method Phaser.Physics.Impact.Components.Acceleration#setAcceleration
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
*
* @return {[type]} [description]
*/
2017-08-15 22:36:00 +00:00
setAcceleration: function (x, y)
{
this.accel.x = x;
this.accel.y = y;
return this;
}
};
module.exports = Acceleration;