2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
|
|
* @copyright 2018 Photon Storm Ltd.
|
|
|
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
|
|
|
*/
|
|
|
|
|
2017-10-13 13:11:54 +00:00
|
|
|
/**
|
2018-01-26 04:53:16 +00:00
|
|
|
* Offsets the Ellipse by the values given.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Geom.Ellipse.Offset
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-01-26 04:53:16 +00:00
|
|
|
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)
|
|
|
|
* @param {number} x - The amount to horizontally offset the Ellipse by.
|
|
|
|
* @param {number} y - The amount to vertically offset the Ellipse by.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
2018-01-26 04:53:16 +00:00
|
|
|
* @return {Phaser.Geom.Ellipse} The Ellipse that was offset.
|
2017-10-13 13:11:54 +00:00
|
|
|
*/
|
2017-01-02 00:47:16 +00:00
|
|
|
var Offset = function (ellipse, x, y)
|
|
|
|
{
|
|
|
|
ellipse.x += x;
|
|
|
|
ellipse.y += y;
|
|
|
|
|
|
|
|
return ellipse;
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Offset;
|