Skip to content

Commit c5675ae

Browse files
committed
Added jsdocs
1 parent ffb604c commit c5675ae

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/physics/matter-js/components/Sensor.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@
55
*/
66

77
/**
8-
* [description]
8+
* Enables a Matter-enabled Game Object to be a sensor. Should be used as a mixin and not directly.
99
*
1010
* @namespace Phaser.Physics.Matter.Components.Sensor
1111
* @since 3.0.0
1212
*/
1313
var Sensor = {
1414

1515
/**
16-
* [description]
16+
* Set the body belonging to this Game Object to be a sensor.
17+
* Sensors trigger collision events, but don't react with colliding body physically.
1718
*
1819
* @method Phaser.Physics.Matter.Components.Sensor#setSensor
1920
* @since 3.0.0
2021
*
21-
* @param {boolean} value - [description]
22+
* @param {boolean} value - `true` to set the body as a sensor, or `false` to disable it.
2223
*
2324
* @return {Phaser.GameObjects.GameObject} This Game Object.
2425
*/
@@ -30,12 +31,12 @@ var Sensor = {
3031
},
3132

3233
/**
33-
* [description]
34+
* Is the body belonging to this Game Object a sensor or not?
3435
*
3536
* @method Phaser.Physics.Matter.Components.Sensor#isSensor
3637
* @since 3.0.0
3738
*
38-
* @return {boolean} [description]
39+
* @return {boolean} `true` if the body is a sensor, otherwise `false`.
3940
*/
4041
isSensor: function ()
4142
{

0 commit comments

Comments
 (0)