mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
JSDoc blocks added.
This commit is contained in:
parent
c6d8423338
commit
a82777461f
23 changed files with 194 additions and 22 deletions
|
@ -1,4 +1,9 @@
|
||||||
// Game level nuke
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.TweenManager#destroy
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
var Destroy = function ()
|
var Destroy = function ()
|
||||||
{
|
{
|
||||||
this.shutdown();
|
this.shutdown();
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
|
// Passes all Tweens to the given callback.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Passes all Tweens to the given callback.
|
* [description]
|
||||||
*
|
*
|
||||||
* @method each
|
* @method Phaser.Tweens.TweenManager#each
|
||||||
* @param {function} callback - The function to call.
|
* @since 3.0.0
|
||||||
* @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.
|
* @param {function} callback - [description]
|
||||||
*/
|
* @param {object} [thisArg] - [description]
|
||||||
|
* @param {...*} [arguments] - [description]
|
||||||
|
*/
|
||||||
var Each = function (callback, thisArg)
|
var Each = function (callback, thisArg)
|
||||||
{
|
{
|
||||||
var args = [ null ];
|
var args = [ null ];
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.TweenManager#getAllTweens
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.Tweens.Tween[]} [description]
|
||||||
|
*/
|
||||||
var GetAllTweens = function ()
|
var GetAllTweens = function ()
|
||||||
{
|
{
|
||||||
var list = this._active;
|
var list = this._active;
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.TweenManager#getGlobalTimeScale
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {number} [description]
|
||||||
|
*/
|
||||||
var GetGlobalTimeScale = function ()
|
var GetGlobalTimeScale = function ()
|
||||||
{
|
{
|
||||||
return this.timeScale;
|
return this.timeScale;
|
||||||
|
|
|
@ -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 GetTweensOf = function (target)
|
||||||
{
|
{
|
||||||
var list = this._active;
|
var list = this._active;
|
||||||
|
|
|
@ -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 IsTweening = function (target)
|
||||||
{
|
{
|
||||||
var list = this._active;
|
var list = this._active;
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.TweenManager#killAll
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.Tweens.TweenManager} [description]
|
||||||
|
*/
|
||||||
var KillAll = function ()
|
var KillAll = function ()
|
||||||
{
|
{
|
||||||
var tweens = this.getAllTweens();
|
var tweens = this.getAllTweens();
|
||||||
|
|
|
@ -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 KillTweensOf = function (target)
|
||||||
{
|
{
|
||||||
var tweens = this.getTweensOf(target);
|
var tweens = this.getTweensOf(target);
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.TweenManager#pauseAll
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.Tweens.TweenManager} [description]
|
||||||
|
*/
|
||||||
var PauseAll = function ()
|
var PauseAll = function ()
|
||||||
{
|
{
|
||||||
var list = this._active;
|
var list = this._active;
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.TweenManager#resumeAll
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.Tweens.TweenManager} [description]
|
||||||
|
*/
|
||||||
var ResumeAll = function ()
|
var ResumeAll = function ()
|
||||||
{
|
{
|
||||||
var list = this._active;
|
var list = this._active;
|
||||||
|
|
|
@ -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)
|
var SetGlobalTimeScale = function (value)
|
||||||
{
|
{
|
||||||
this.timeScale = value;
|
this.timeScale = value;
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
// Scene that owns this manager is shutting down
|
// Scene that owns this manager is shutting down
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.TweenManager#shutdown
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
var Shutdown = function ()
|
var Shutdown = function ()
|
||||||
{
|
{
|
||||||
this.killAll();
|
this.killAll();
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.Tween#calcDuration
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
var CalcDuration = function ()
|
var CalcDuration = function ()
|
||||||
{
|
{
|
||||||
var max = 0;
|
var max = 0;
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
var TWEEN_CONST = require('../const');
|
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 Init = function ()
|
||||||
{
|
{
|
||||||
var data = this.data;
|
var data = this.data;
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
var TWEEN_CONST = require('../const');
|
var TWEEN_CONST = require('../const');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.Tween#nextState
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
var NextState = function ()
|
var NextState = function ()
|
||||||
{
|
{
|
||||||
if (this.loopCounter > 0)
|
if (this.loopCounter > 0)
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
var TWEEN_CONST = require('../const');
|
var TWEEN_CONST = require('../const');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.Tween#pause
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.Tweens.Tween} [description]
|
||||||
|
*/
|
||||||
var Pause = function ()
|
var Pause = function ()
|
||||||
{
|
{
|
||||||
if (this.state === TWEEN_CONST.PAUSED)
|
if (this.state === TWEEN_CONST.PAUSED)
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
var TWEEN_CONST = require('../const');
|
var TWEEN_CONST = require('../const');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.Tween#play
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {boolean} resetFromTimeline - [description]
|
||||||
|
*/
|
||||||
var Play = function (resetFromTimeline)
|
var Play = function (resetFromTimeline)
|
||||||
{
|
{
|
||||||
if (this.state === TWEEN_CONST.ACTIVE)
|
if (this.state === TWEEN_CONST.ACTIVE)
|
||||||
|
@ -42,8 +50,6 @@ var Play = function (resetFromTimeline)
|
||||||
this.paused = false;
|
this.paused = false;
|
||||||
|
|
||||||
this.parent.makeActive(this);
|
this.parent.makeActive(this);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
var TWEEN_CONST = require('../const');
|
var TWEEN_CONST = require('../const');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.Tween#resetTweenData
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {boolean} resetFromLoop - [description]
|
||||||
|
*/
|
||||||
var ResetTweenData = function (resetFromLoop)
|
var ResetTweenData = function (resetFromLoop)
|
||||||
{
|
{
|
||||||
var data = this.data;
|
var data = this.data;
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
var TWEEN_CONST = require('../const');
|
var TWEEN_CONST = require('../const');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Tweens.Tween#pause
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.Tweens.Tween} [description]
|
||||||
|
*/
|
||||||
var Pause = function ()
|
var Pause = function ()
|
||||||
{
|
{
|
||||||
if (this.state === TWEEN_CONST.PAUSED)
|
if (this.state === TWEEN_CONST.PAUSED)
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
// var TWEEN_CONST = require('../const');
|
/**
|
||||||
|
* [description]
|
||||||
// For now progress = 0 to 1
|
*
|
||||||
|
* @method Phaser.Tweens.Tween#seek
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {float} toPosition - A value between 0 and 1.
|
||||||
|
*/
|
||||||
var Seek = function (toPosition)
|
var Seek = function (toPosition)
|
||||||
{
|
{
|
||||||
var data = this.data;
|
var data = this.data;
|
||||||
|
|
|
@ -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)
|
var SetCallback = function (type, callback, params, scope)
|
||||||
{
|
{
|
||||||
this.callbacks[type] = { func: callback, scope: scope, params: params };
|
this.callbacks[type] = { func: callback, scope: scope, params: params };
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
var TWEEN_CONST = require('../const');
|
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 ()
|
var Stop = function ()
|
||||||
{
|
{
|
||||||
this.state = TWEEN_CONST.PENDING_REMOVE;
|
this.state = TWEEN_CONST.PENDING_REMOVE;
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
var TWEEN_CONST = require('../const');
|
var TWEEN_CONST = require('../const');
|
||||||
var UpdateTweenData = require('./UpdateTweenData');
|
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)
|
var Update = function (timestamp, delta)
|
||||||
{
|
{
|
||||||
if (this.state === TWEEN_CONST.PAUSED)
|
if (this.state === TWEEN_CONST.PAUSED)
|
||||||
|
|
Loading…
Reference in a new issue