2018-02-09 01:40:41 +00:00
|
|
|
/**
|
|
|
|
* [description]
|
|
|
|
*
|
|
|
|
* @name Phaser.Physics.Impact.Components.Acceleration
|
|
|
|
* @since 3.0.0
|
|
|
|
*/
|
2017-08-15 22:36:00 +00:00
|
|
|
var Acceleration = {
|
|
|
|
|
2018-02-09 01:40:41 +00:00
|
|
|
/**
|
|
|
|
* [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;
|
|
|
|
},
|
|
|
|
|
2018-02-09 01:40:41 +00:00
|
|
|
/**
|
|
|
|
* [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;
|
|
|
|
},
|
|
|
|
|
2018-02-09 01:40:41 +00:00
|
|
|
/**
|
|
|
|
* [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;
|