mirror of
https://github.com/photonstorm/phaser
synced 2024-12-01 00:49:41 +00:00
JSDoc blocks added.
This commit is contained in:
parent
60d9133d05
commit
c22668d53d
16 changed files with 118 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#getFirstTick
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.GameObjects.Components.Animation} component - [description]
|
||||||
|
* @param {boolean} [includeDelay=true] - [description]
|
||||||
|
*/
|
||||||
var GetFirstTick = function (component, includeDelay)
|
var GetFirstTick = function (component, includeDelay)
|
||||||
{
|
{
|
||||||
if (includeDelay === undefined) { includeDelay = true; }
|
if (includeDelay === undefined) { includeDelay = true; }
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#getFrameAt
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {integer} index - [description]
|
||||||
|
*
|
||||||
|
* @return {Phaser.Animations.AnimationFrame} [description]
|
||||||
|
*/
|
||||||
var GetFrameAt = function (index)
|
var GetFrameAt = function (index)
|
||||||
{
|
{
|
||||||
return this.frames[index];
|
return this.frames[index];
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
var Frame = require('../AnimationFrame');
|
var Frame = require('../AnimationFrame');
|
||||||
var GetValue = require('../../../utils/object/GetValue');
|
var GetValue = require('../../../utils/object/GetValue');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#getFrames
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {[type]} textureManager - [description]
|
||||||
|
* @param {[type]} frames - [description]
|
||||||
|
*
|
||||||
|
* @return {Phaser.Animations.AnimationFrame[]} [description]
|
||||||
|
*/
|
||||||
var GetFrames = function (textureManager, frames)
|
var GetFrames = function (textureManager, frames)
|
||||||
{
|
{
|
||||||
// frames: [
|
// frames: [
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#getNextTick
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.GameObjects.Components.Animation} component - [description]
|
||||||
|
*/
|
||||||
var GetNextTick = function (component)
|
var GetNextTick = function (component)
|
||||||
{
|
{
|
||||||
// accumulator += delta * _timeScale
|
// accumulator += delta * _timeScale
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#load
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.GameObjects.Components.Animation} component - [description]
|
||||||
|
* @param {integer} startFrame - [description]
|
||||||
|
*/
|
||||||
var Load = function (component, startFrame)
|
var Load = function (component, startFrame)
|
||||||
{
|
{
|
||||||
if (startFrame >= this.frames.length)
|
if (startFrame >= this.frames.length)
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#nextFrame
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.GameObjects.Components.Animation} component - [description]
|
||||||
|
*/
|
||||||
var NextFrame = function (component)
|
var NextFrame = function (component)
|
||||||
{
|
{
|
||||||
var frame = component.currentFrame;
|
var frame = component.currentFrame;
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#previousFrame
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.GameObjects.Components.Animation} component - [description]
|
||||||
|
*/
|
||||||
var PreviousFrame = function (component)
|
var PreviousFrame = function (component)
|
||||||
{
|
{
|
||||||
var frame = component.currentFrame;
|
var frame = component.currentFrame;
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
// Remove frame if it matches the given frame
|
// Remove frame if it matches the given frame
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#removeFrame
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.Animations.AnimationFrame} frame - [description]
|
||||||
|
*
|
||||||
|
* @return {Phaser.Animations.Animation} [description]
|
||||||
|
*/
|
||||||
var RemoveFrame = function (frame)
|
var RemoveFrame = function (frame)
|
||||||
{
|
{
|
||||||
var index = this.frames.indexOf(frame);
|
var index = this.frames.indexOf(frame);
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#removeFrameAt
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {integer} index - [description]
|
||||||
|
*
|
||||||
|
* @return {Phaser.Animations.Animation} [description]
|
||||||
|
*/
|
||||||
var RemoveFrameAt = function (index)
|
var RemoveFrameAt = function (index)
|
||||||
{
|
{
|
||||||
this.frames.splice(index, 1);
|
this.frames.splice(index, 1);
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#repeatAnimation
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.GameObjects.Components.Animation} component - [description]
|
||||||
|
*/
|
||||||
var RepeatAnimation = function (component)
|
var RepeatAnimation = function (component)
|
||||||
{
|
{
|
||||||
if (component._repeatDelay > 0 && component.pendingRepeat === false)
|
if (component._repeatDelay > 0 && component.pendingRepeat === false)
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#setFrame
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param {Phaser.GameObjects.Components.Animation} component - [description]
|
||||||
|
*/
|
||||||
var SetFrame = function (component)
|
var SetFrame = function (component)
|
||||||
{
|
{
|
||||||
// Work out which frame should be set next on the child, and set it
|
// Work out which frame should be set next on the child, and set it
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#toJSON
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {object} [description]
|
||||||
|
*/
|
||||||
var ToJSON = function ()
|
var ToJSON = function ()
|
||||||
{
|
{
|
||||||
var output = {
|
var output = {
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/**
|
||||||
|
* [description]
|
||||||
|
*
|
||||||
|
* @method Phaser.Animations.Animation#updateFrameSequence
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.Animations.Animation} [description]
|
||||||
|
*/
|
||||||
var UpdateFrameSequence = function ()
|
var UpdateFrameSequence = function ()
|
||||||
{
|
{
|
||||||
var len = this.frames.length;
|
var len = this.frames.length;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @param {string|object} data - [description]
|
* @param {string|object} data - [description]
|
||||||
* @param {boolean} [clearCurrentAnimations=false] - [description]
|
* @param {boolean} [clearCurrentAnimations=false] - [description]
|
||||||
*
|
*
|
||||||
* @return {array} An array containing all of the Animation objects that were created as a result of this call.
|
* @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.
|
||||||
*/
|
*/
|
||||||
var FromJSON = function (data, clearCurrentAnimations)
|
var FromJSON = function (data, clearCurrentAnimations)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@ var Pad = require('../../../utils/string/Pad');
|
||||||
* @param {array} [config.outputArray=[]] - [description]
|
* @param {array} [config.outputArray=[]] - [description]
|
||||||
* @param {boolean} [config.frames=false] - [description]
|
* @param {boolean} [config.frames=false] - [description]
|
||||||
*
|
*
|
||||||
* @return {array} [description]
|
* @return {object[]} [description]
|
||||||
*/
|
*/
|
||||||
var GenerateFrameNames = function (key, config)
|
var GenerateFrameNames = function (key, config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ var GetValue = require('../../../utils/object/GetValue');
|
||||||
* @param {array} [config.outputArray=[]] - [description]
|
* @param {array} [config.outputArray=[]] - [description]
|
||||||
* @param {boolean} [config.frames=false] - [description]
|
* @param {boolean} [config.frames=false] - [description]
|
||||||
*
|
*
|
||||||
* @return {array} [description]
|
* @return {object[]} [description]
|
||||||
*/
|
*/
|
||||||
var GenerateFrameNumbers = function (key, config)
|
var GenerateFrameNumbers = function (key, config)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue