phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.
29 lines (26 loc) • 694 B
JavaScript
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* [description]
*
* @function Phaser.Geom.Rectangle.Overlaps
* @since 3.0.0
*
* @param {Phaser.Geom.Rectangle} rectA - [description]
* @param {Phaser.Geom.Rectangle} rectB - [description]
*
* @return {boolean} [description]
*/
var Overlaps = function (rectA, rectB)
{
return (
rectA.x < rectB.right &&
rectA.right > rectB.x &&
rectA.y < rectB.bottom &&
rectA.bottom > rectB.y
);
};
module.exports = Overlaps;