mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return this.frames[index];
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
var Frame = require('../AnimationFrame');
|
||||
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)
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
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 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 frame = component.currentFrame;
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
// 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 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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
// 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 output = {
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/**
|
||||
* [description]
|
||||
*
|
||||
* @method Phaser.Animations.Animation#updateFrameSequence
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @return {Phaser.Animations.Animation} [description]
|
||||
*/
|
||||
var UpdateFrameSequence = function ()
|
||||
{
|
||||
var len = this.frames.length;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @param {string|object} data - [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)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ var Pad = require('../../../utils/string/Pad');
|
|||
* @param {array} [config.outputArray=[]] - [description]
|
||||
* @param {boolean} [config.frames=false] - [description]
|
||||
*
|
||||
* @return {array} [description]
|
||||
* @return {object[]} [description]
|
||||
*/
|
||||
var GenerateFrameNames = function (key, config)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ var GetValue = require('../../../utils/object/GetValue');
|
|||
* @param {array} [config.outputArray=[]] - [description]
|
||||
* @param {boolean} [config.frames=false] - [description]
|
||||
*
|
||||
* @return {array} [description]
|
||||
* @return {object[]} [description]
|
||||
*/
|
||||
var GenerateFrameNumbers = function (key, config)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue