diff --git a/v3/src/tweens/manager/inc/Destroy.js b/v3/src/tweens/manager/inc/Destroy.js index eda0427a5..f7de0d5c4 100644 --- a/v3/src/tweens/manager/inc/Destroy.js +++ b/v3/src/tweens/manager/inc/Destroy.js @@ -1,4 +1,9 @@ -// Game level nuke +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#destroy + * @since 3.0.0 + */ var Destroy = function () { this.shutdown(); diff --git a/v3/src/tweens/manager/inc/Each.js b/v3/src/tweens/manager/inc/Each.js index d15f13647..9c4caebad 100644 --- a/v3/src/tweens/manager/inc/Each.js +++ b/v3/src/tweens/manager/inc/Each.js @@ -1,11 +1,15 @@ +// Passes all Tweens to the given callback. + /** -* Passes all Tweens to the given callback. -* -* @method each -* @param {function} callback - The function to call. -* @param {object} [thisArg] - Value to use as `this` when executing callback. -* @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the child. -*/ + * [description] + * + * @method Phaser.Tweens.TweenManager#each + * @since 3.0.0 + * + * @param {function} callback - [description] + * @param {object} [thisArg] - [description] + * @param {...*} [arguments] - [description] + */ var Each = function (callback, thisArg) { var args = [ null ]; diff --git a/v3/src/tweens/manager/inc/GetAllTweens.js b/v3/src/tweens/manager/inc/GetAllTweens.js index 66a37d745..0f7671b47 100644 --- a/v3/src/tweens/manager/inc/GetAllTweens.js +++ b/v3/src/tweens/manager/inc/GetAllTweens.js @@ -1,3 +1,11 @@ +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#getAllTweens + * @since 3.0.0 + * + * @return {Phaser.Tweens.Tween[]} [description] + */ var GetAllTweens = function () { var list = this._active; diff --git a/v3/src/tweens/manager/inc/GetGlobalTimeScale.js b/v3/src/tweens/manager/inc/GetGlobalTimeScale.js index 499d1f0db..0e697b8c0 100644 --- a/v3/src/tweens/manager/inc/GetGlobalTimeScale.js +++ b/v3/src/tweens/manager/inc/GetGlobalTimeScale.js @@ -1,3 +1,11 @@ +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#getGlobalTimeScale + * @since 3.0.0 + * + * @return {number} [description] + */ var GetGlobalTimeScale = function () { return this.timeScale; diff --git a/v3/src/tweens/manager/inc/GetTweensOf.js b/v3/src/tweens/manager/inc/GetTweensOf.js index a18015382..161bca83b 100644 --- a/v3/src/tweens/manager/inc/GetTweensOf.js +++ b/v3/src/tweens/manager/inc/GetTweensOf.js @@ -1,4 +1,13 @@ -// Single Target or an Array of targets +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#getTweensOf + * @since 3.0.0 + * + * @param {object|array} target - [description] + * + * @return {Phaser.Tweens.Tween[]} [description] + */ var GetTweensOf = function (target) { var list = this._active; diff --git a/v3/src/tweens/manager/inc/IsTweening.js b/v3/src/tweens/manager/inc/IsTweening.js index 9ca0e1386..e92f3b0dd 100644 --- a/v3/src/tweens/manager/inc/IsTweening.js +++ b/v3/src/tweens/manager/inc/IsTweening.js @@ -1,4 +1,13 @@ -// Single Target only +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#isTweening + * @since 3.0.0 + * + * @param {any} target - [description] + * + * @return {boolean} [description] + */ var IsTweening = function (target) { var list = this._active; diff --git a/v3/src/tweens/manager/inc/KillAll.js b/v3/src/tweens/manager/inc/KillAll.js index 2fb5bed4e..7041ccdf2 100644 --- a/v3/src/tweens/manager/inc/KillAll.js +++ b/v3/src/tweens/manager/inc/KillAll.js @@ -1,3 +1,11 @@ +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#killAll + * @since 3.0.0 + * + * @return {Phaser.Tweens.TweenManager} [description] + */ var KillAll = function () { var tweens = this.getAllTweens(); diff --git a/v3/src/tweens/manager/inc/KillTweensOf.js b/v3/src/tweens/manager/inc/KillTweensOf.js index 05d079967..98708a976 100644 --- a/v3/src/tweens/manager/inc/KillTweensOf.js +++ b/v3/src/tweens/manager/inc/KillTweensOf.js @@ -1,4 +1,13 @@ -// Single Target or an Array of targets +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#killTweensOf + * @since 3.0.0 + * + * @param {object|array} target - [description] + * + * @return {Phaser.Tweens.TweenManager} [description] + */ var KillTweensOf = function (target) { var tweens = this.getTweensOf(target); diff --git a/v3/src/tweens/manager/inc/PauseAll.js b/v3/src/tweens/manager/inc/PauseAll.js index 385108149..00b795910 100644 --- a/v3/src/tweens/manager/inc/PauseAll.js +++ b/v3/src/tweens/manager/inc/PauseAll.js @@ -1,3 +1,11 @@ +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#pauseAll + * @since 3.0.0 + * + * @return {Phaser.Tweens.TweenManager} [description] + */ var PauseAll = function () { var list = this._active; diff --git a/v3/src/tweens/manager/inc/ResumeAll.js b/v3/src/tweens/manager/inc/ResumeAll.js index 85f81bdf4..588634545 100644 --- a/v3/src/tweens/manager/inc/ResumeAll.js +++ b/v3/src/tweens/manager/inc/ResumeAll.js @@ -1,3 +1,11 @@ +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#resumeAll + * @since 3.0.0 + * + * @return {Phaser.Tweens.TweenManager} [description] + */ var ResumeAll = function () { var list = this._active; diff --git a/v3/src/tweens/manager/inc/SetGlobalTimeScale.js b/v3/src/tweens/manager/inc/SetGlobalTimeScale.js index 77d2cbb7c..b5bcf0add 100644 --- a/v3/src/tweens/manager/inc/SetGlobalTimeScale.js +++ b/v3/src/tweens/manager/inc/SetGlobalTimeScale.js @@ -1,3 +1,13 @@ +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#setGlobalTimeScale + * @since 3.0.0 + * + * @param {float} value - [description] + * + * @return {Phaser.Tweens.TweenManager} [description] + */ var SetGlobalTimeScale = function (value) { this.timeScale = value; diff --git a/v3/src/tweens/manager/inc/Shutdown.js b/v3/src/tweens/manager/inc/Shutdown.js index 4b3495186..6475ab877 100644 --- a/v3/src/tweens/manager/inc/Shutdown.js +++ b/v3/src/tweens/manager/inc/Shutdown.js @@ -1,4 +1,11 @@ // Scene that owns this manager is shutting down + +/** + * [description] + * + * @method Phaser.Tweens.TweenManager#shutdown + * @since 3.0.0 + */ var Shutdown = function () { this.killAll(); diff --git a/v3/src/tweens/tween/inc/CalcDuration.js b/v3/src/tweens/tween/inc/CalcDuration.js index 06a6f7543..01c53b11d 100644 --- a/v3/src/tweens/tween/inc/CalcDuration.js +++ b/v3/src/tweens/tween/inc/CalcDuration.js @@ -1,3 +1,9 @@ +/** + * [description] + * + * @method Phaser.Tweens.Tween#calcDuration + * @since 3.0.0 + */ var CalcDuration = function () { var max = 0; diff --git a/v3/src/tweens/tween/inc/Init.js b/v3/src/tweens/tween/inc/Init.js index 3952b5478..66f323fd3 100644 --- a/v3/src/tweens/tween/inc/Init.js +++ b/v3/src/tweens/tween/inc/Init.js @@ -1,6 +1,13 @@ var TWEEN_CONST = require('../const'); -// Return true if this Tween should be moved from the pending list to the active list +/** + * [description] + * + * @method Phaser.Tweens.Tween#init + * @since 3.0.0 + * + * @return {boolean} Returns `true` if this Tween should be moved from the pending list to the active list by the Tween Manager. + */ var Init = function () { var data = this.data; diff --git a/v3/src/tweens/tween/inc/NextState.js b/v3/src/tweens/tween/inc/NextState.js index 0afbb2dd8..1f3967be4 100644 --- a/v3/src/tweens/tween/inc/NextState.js +++ b/v3/src/tweens/tween/inc/NextState.js @@ -1,5 +1,11 @@ var TWEEN_CONST = require('../const'); +/** + * [description] + * + * @method Phaser.Tweens.Tween#nextState + * @since 3.0.0 + */ var NextState = function () { if (this.loopCounter > 0) diff --git a/v3/src/tweens/tween/inc/Pause.js b/v3/src/tweens/tween/inc/Pause.js index 3e902972d..9355a45fc 100644 --- a/v3/src/tweens/tween/inc/Pause.js +++ b/v3/src/tweens/tween/inc/Pause.js @@ -1,5 +1,13 @@ var TWEEN_CONST = require('../const'); +/** + * [description] + * + * @method Phaser.Tweens.Tween#pause + * @since 3.0.0 + * + * @return {Phaser.Tweens.Tween} [description] + */ var Pause = function () { if (this.state === TWEEN_CONST.PAUSED) diff --git a/v3/src/tweens/tween/inc/Play.js b/v3/src/tweens/tween/inc/Play.js index 10217121f..d3ac1cdc4 100644 --- a/v3/src/tweens/tween/inc/Play.js +++ b/v3/src/tweens/tween/inc/Play.js @@ -1,5 +1,13 @@ var TWEEN_CONST = require('../const'); +/** + * [description] + * + * @method Phaser.Tweens.Tween#play + * @since 3.0.0 + * + * @param {boolean} resetFromTimeline - [description] + */ var Play = function (resetFromTimeline) { if (this.state === TWEEN_CONST.ACTIVE) @@ -42,8 +50,6 @@ var Play = function (resetFromTimeline) this.paused = false; this.parent.makeActive(this); - - return; } else { diff --git a/v3/src/tweens/tween/inc/ResetTweenData.js b/v3/src/tweens/tween/inc/ResetTweenData.js index 0b6101ee0..5c0393742 100644 --- a/v3/src/tweens/tween/inc/ResetTweenData.js +++ b/v3/src/tweens/tween/inc/ResetTweenData.js @@ -1,5 +1,13 @@ var TWEEN_CONST = require('../const'); +/** + * [description] + * + * @method Phaser.Tweens.Tween#resetTweenData + * @since 3.0.0 + * + * @param {boolean} resetFromLoop - [description] + */ var ResetTweenData = function (resetFromLoop) { var data = this.data; diff --git a/v3/src/tweens/tween/inc/Resume.js b/v3/src/tweens/tween/inc/Resume.js index f106c9c91..41a76cba9 100644 --- a/v3/src/tweens/tween/inc/Resume.js +++ b/v3/src/tweens/tween/inc/Resume.js @@ -1,5 +1,13 @@ var TWEEN_CONST = require('../const'); +/** + * [description] + * + * @method Phaser.Tweens.Tween#pause + * @since 3.0.0 + * + * @return {Phaser.Tweens.Tween} [description] + */ var Pause = function () { if (this.state === TWEEN_CONST.PAUSED) diff --git a/v3/src/tweens/tween/inc/Seek.js b/v3/src/tweens/tween/inc/Seek.js index 6dea3c3b5..8a3992818 100644 --- a/v3/src/tweens/tween/inc/Seek.js +++ b/v3/src/tweens/tween/inc/Seek.js @@ -1,6 +1,11 @@ -// var TWEEN_CONST = require('../const'); - -// For now progress = 0 to 1 +/** + * [description] + * + * @method Phaser.Tweens.Tween#seek + * @since 3.0.0 + * + * @param {float} toPosition - A value between 0 and 1. + */ var Seek = function (toPosition) { var data = this.data; diff --git a/v3/src/tweens/tween/inc/SetCallback.js b/v3/src/tweens/tween/inc/SetCallback.js index 2603a8d6d..3485f8b86 100644 --- a/v3/src/tweens/tween/inc/SetCallback.js +++ b/v3/src/tweens/tween/inc/SetCallback.js @@ -1,4 +1,16 @@ - +/** + * [description] + * + * @method Phaser.Tweens.Tween#setCallback + * @since 3.0.0 + * + * @param {string} type - [description] + * @param {function} callback - [description] + * @param {array} params - [description] + * @param {object} scope - [description] + * + * @return {Phaser.Tweens.Tween} [description] + */ var SetCallback = function (type, callback, params, scope) { this.callbacks[type] = { func: callback, scope: scope, params: params }; diff --git a/v3/src/tweens/tween/inc/Stop.js b/v3/src/tweens/tween/inc/Stop.js index d068bccb7..c00a0ade6 100644 --- a/v3/src/tweens/tween/inc/Stop.js +++ b/v3/src/tweens/tween/inc/Stop.js @@ -1,7 +1,11 @@ var TWEEN_CONST = require('../const'); -// Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager - +/** + * Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager. + * + * @method Phaser.Tweens.Tween#stop + * @since 3.0.0 + */ var Stop = function () { this.state = TWEEN_CONST.PENDING_REMOVE; diff --git a/v3/src/tweens/tween/inc/Update.js b/v3/src/tweens/tween/inc/Update.js index 9fbb1f001..4cac9f8e3 100644 --- a/v3/src/tweens/tween/inc/Update.js +++ b/v3/src/tweens/tween/inc/Update.js @@ -1,8 +1,17 @@ var TWEEN_CONST = require('../const'); var UpdateTweenData = require('./UpdateTweenData'); -// Returns 'true' if this Tween has finished and should be removed from the Tween Manager -// Otherwise, returns false +/** + * [description] + * + * @method Phaser.Tweens.Tween#update + * @since 3.0.0 + * + * @param {number} timestamp - [description] + * @param {float} delta - [description] + * + * @return {boolean} Returns `true` if this Tween has finished and should be removed from the Tween Manager, otherwise returns `false`. + */ var Update = function (timestamp, delta) { if (this.state === TWEEN_CONST.PAUSED)