phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.
48 lines (41 loc) • 993 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]
*
* @name Phaser.Physics.Matter.Components.Sensor
* @since 3.0.0
*/
var Sensor = {
/**
* [description]
*
* @method Phaser.Physics.Matter.Components.Sensor#setSensor
* @since 3.0.0
*
* @param {boolean} value - [description]
*
* @return {Phaser.GameObjects.GameObject} This Game Object.
*/
setSensor: function (value)
{
this.body.isSensor = value;
return this;
},
/**
* [description]
*
* @method Phaser.Physics.Matter.Components.Sensor#isSensor
* @since 3.0.0
*
* @return {boolean} [description]
*/
isSensor: function ()
{
return this.body.isSensor;
}
};
module.exports = Sensor;