mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 06:30:38 +00:00
Added jsdocs
This commit is contained in:
parent
25339383f1
commit
beefcf09b6
1 changed files with 15 additions and 10 deletions
|
@ -8,7 +8,7 @@ var Events = require('../events');
|
|||
var MatterEvents = require('../lib/core/Events');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly.
|
||||
*
|
||||
* @namespace Phaser.Physics.Matter.Components.Sleep
|
||||
* @since 3.0.0
|
||||
|
@ -16,12 +16,12 @@ var MatterEvents = require('../lib/core/Events');
|
|||
var Sleep = {
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine).
|
||||
*
|
||||
* @method Phaser.Physics.Matter.Components.Sleep#setSleepThreshold
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {number} [value=60] - [description]
|
||||
* @param {number} [value=60] - A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping.
|
||||
*
|
||||
* @return {Phaser.GameObjects.GameObject} This Game Object.
|
||||
*/
|
||||
|
@ -35,13 +35,18 @@ var Sleep = {
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Enable sleep and wake events for this body.
|
||||
*
|
||||
* By default when a body goes to sleep, or wakes up, it will not emit any events.
|
||||
*
|
||||
* The events are emitted by the Matter World instance and can be listened to via
|
||||
* the `SLEEP_START` and `SLEEP_END` events.
|
||||
*
|
||||
* @method Phaser.Physics.Matter.Components.Sleep#setSleepEvents
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {boolean} start - [description]
|
||||
* @param {boolean} end - [description]
|
||||
* @param {boolean} start - `true` if you want the sleep start event to be emitted for this body.
|
||||
* @param {boolean} end - `true` if you want the sleep end event to be emitted for this body.
|
||||
*
|
||||
* @return {Phaser.GameObjects.GameObject} This Game Object.
|
||||
*/
|
||||
|
@ -54,12 +59,12 @@ var Sleep = {
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Enables or disables the Sleep Start event for this body.
|
||||
*
|
||||
* @method Phaser.Physics.Matter.Components.Sleep#setSleepStartEvent
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {boolean} value - [description]
|
||||
* @param {boolean} value - `true` to enable the sleep event, or `false` to disable it.
|
||||
*
|
||||
* @return {Phaser.GameObjects.GameObject} This Game Object.
|
||||
*/
|
||||
|
@ -83,12 +88,12 @@ var Sleep = {
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Enables or disables the Sleep End event for this body.
|
||||
*
|
||||
* @method Phaser.Physics.Matter.Components.Sleep#setSleepEndEvent
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {boolean} value - [description]
|
||||
* @param {boolean} value - `true` to enable the sleep event, or `false` to disable it.
|
||||
*
|
||||
* @return {Phaser.GameObjects.GameObject} This Game Object.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue