fisrt commit
This commit is contained in:
44
node_modules/phaser/plugins/impact/components/Offset.js
generated
vendored
Normal file
44
node_modules/phaser/plugins/impact/components/Offset.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2020 Photon Storm Ltd.
|
||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Impact Offset component.
|
||||
* Should be applied as a mixin.
|
||||
*
|
||||
* @namespace Phaser.Physics.Impact.Components.Offset
|
||||
* @since 3.0.0
|
||||
*/
|
||||
var Offset = {
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
* @method Phaser.Physics.Impact.Components.Offset#setOffset
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {number} x - [description]
|
||||
* @param {number} y - [description]
|
||||
* @param {number} [width] - [description]
|
||||
* @param {number} [height] - [description]
|
||||
*
|
||||
* @return {Phaser.GameObjects.GameObject} This Game Object.
|
||||
*/
|
||||
setOffset: function (x, y, width, height)
|
||||
{
|
||||
this.body.offset.x = x;
|
||||
this.body.offset.y = y;
|
||||
|
||||
if (width)
|
||||
{
|
||||
this.setBodySize(width, height);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
module.exports = Offset;
|
||||
Reference in New Issue
Block a user