2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2020-01-15 12:07:09 +00:00
|
|
|
* @copyright 2020 Photon Storm Ltd.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2018-02-12 16:01:20 +00:00
|
|
|
*/
|
|
|
|
|
2017-10-04 23:58:42 +00:00
|
|
|
/**
|
2018-01-26 04:18:22 +00:00
|
|
|
* Offsets the Circle by the values given.
|
2017-10-04 23:58:42 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Geom.Circle.Offset
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-03-27 13:27:08 +00:00
|
|
|
* @generic {Phaser.Geom.Circle} O - [circle,$return]
|
|
|
|
*
|
2018-01-26 04:18:22 +00:00
|
|
|
* @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)
|
|
|
|
* @param {number} x - The amount to horizontally offset the Circle by.
|
|
|
|
* @param {number} y - The amount to vertically offset the Circle by.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
2018-01-26 04:18:22 +00:00
|
|
|
* @return {Phaser.Geom.Circle} The Circle that was offset.
|
2017-10-04 23:58:42 +00:00
|
|
|
*/
|
2016-12-29 00:17:20 +00:00
|
|
|
var Offset = function (circle, x, y)
|
|
|
|
{
|
|
|
|
circle.x += x;
|
|
|
|
circle.y += y;
|
|
|
|
|
|
|
|
return circle;
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Offset;
|