Skip to content

Commit 75bdfcc

Browse files
committed
Merge branch 'master' of https://github.com/photonstorm/phaser
2 parents 89b9f42 + dfe3351 commit 75bdfcc

1 file changed

Lines changed: 29 additions & 25 deletions

File tree

src/animations/AnimationManager.js

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var Pad = require('../utils/string/Pad');
3434
* @constructor
3535
* @since 3.0.0
3636
*
37-
* @param {Phaser.Game} game - [description]
37+
* @param {Phaser.Game} game - A reference to the Phaser.Game instance.
3838
*/
3939
var AnimationManager = new Class({
4040

@@ -47,7 +47,7 @@ var AnimationManager = new Class({
4747
EventEmitter.call(this);
4848

4949
/**
50-
* [description]
50+
* A reference to the Phaser.Game instance.
5151
*
5252
* @name Phaser.Animations.AnimationManager#game
5353
* @type {Phaser.Game}
@@ -57,7 +57,7 @@ var AnimationManager = new Class({
5757
this.game = game;
5858

5959
/**
60-
* [description]
60+
* A reference to the Texture Manager.
6161
*
6262
* @name Phaser.Animations.AnimationManager#textureManager
6363
* @type {Phaser.Textures.TextureManager}
@@ -242,15 +242,17 @@ var AnimationManager = new Class({
242242
*/
243243

244244
/**
245-
* [description]
245+
* Generate an array of {@link AnimationFrameConfig} objects from a texture key and configuration object.
246+
*
247+
* Generates objects with string frame names, as configured by the given {@link AnimationFrameConfig}.
246248
*
247249
* @method Phaser.Animations.AnimationManager#generateFrameNames
248250
* @since 3.0.0
249251
*
250-
* @param {string} key - [description]
251-
* @param {GenerateFrameNamesConfig} [config] - [description]
252+
* @param {string} key - The key for the texture containing the animation frames.
253+
* @param {GenerateFrameNamesConfig} [config] - The configuration object for the animation frame names.
252254
*
253-
* @return {AnimationFrameConfig[]} [description]
255+
* @return {AnimationFrameConfig[]} The array of {@link AnimationFrameConfig} objects.
254256
*/
255257
generateFrameNames: function (key, config)
256258
{
@@ -327,7 +329,9 @@ var AnimationManager = new Class({
327329
*/
328330

329331
/**
330-
* Generates an array of {@link AnimationFrameConfig} objects from a texture key and configuration object.
332+
* Generate an array of {@link AnimationFrameConfig} objects from a texture key and configuration object.
333+
*
334+
* Generates objects with numbered frame names, as configured by the given {@link GenerateFrameNumbersConfig}.
331335
*
332336
* @method Phaser.Animations.AnimationManager#generateFrameNumbers
333337
* @since 3.0.0
@@ -391,29 +395,29 @@ var AnimationManager = new Class({
391395
},
392396

393397
/**
394-
* [description]
398+
* Get an Animation.
395399
*
396400
* @method Phaser.Animations.AnimationManager#get
397401
* @since 3.0.0
398402
*
399-
* @param {string} key - [description]
403+
* @param {string} key - The key of the Animation to retrieve.
400404
*
401-
* @return {Phaser.Animations.Animation} [description]
405+
* @return {Phaser.Animations.Animation} The Animation.
402406
*/
403407
get: function (key)
404408
{
405409
return this.anims.get(key);
406410
},
407411

408412
/**
409-
* Load an Animation into a Game Objects Animation Component.
413+
* Load an Animation into a Game Object's Animation Component.
410414
*
411415
* @method Phaser.Animations.AnimationManager#load
412416
* @since 3.0.0
413417
*
414-
* @param {Phaser.GameObjects.GameObject} child - [description]
415-
* @param {string} key - [description]
416-
* @param {(string|integer)} [startFrame] - [description]
418+
* @param {Phaser.GameObjects.GameObject} child - The Game Object to load the animation into.
419+
* @param {string} key - The key of the animation to load.
420+
* @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation.
417421
*
418422
* @return {Phaser.GameObjects.GameObject} [description]
419423
*/
@@ -430,7 +434,7 @@ var AnimationManager = new Class({
430434
},
431435

432436
/**
433-
* [description]
437+
* Pause all animations.
434438
*
435439
* @method Phaser.Animations.AnimationManager#pauseAll
436440
* @fires PauseAllAnimationEvent
@@ -451,13 +455,13 @@ var AnimationManager = new Class({
451455
},
452456

453457
/**
454-
* [description]
458+
* Play an animation on the given Game Objects that have an Animation Component.
455459
*
456460
* @method Phaser.Animations.AnimationManager#play
457461
* @since 3.0.0
458462
*
459-
* @param {string} key - [description]
460-
* @param {Phaser.GameObjects.GameObject} child - [description]
463+
* @param {string} key - The key of the animation to play on the Game Object.
464+
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on.
461465
*
462466
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
463467
*/
@@ -484,13 +488,13 @@ var AnimationManager = new Class({
484488
},
485489

486490
/**
487-
* [description]
491+
* Remove an animation.
488492
*
489493
* @method Phaser.Animations.AnimationManager#remove
490494
* @fires RemoveAnimationEvent
491495
* @since 3.0.0
492496
*
493-
* @param {string} key - [description]
497+
* @param {string} key - The key of the animation to remove.
494498
*
495499
* @return {Phaser.Animations.Animation} [description]
496500
*/
@@ -509,7 +513,7 @@ var AnimationManager = new Class({
509513
},
510514

511515
/**
512-
* [description]
516+
* Resume all paused animations.
513517
*
514518
* @method Phaser.Animations.AnimationManager#resumeAll
515519
* @fires ResumeAllAnimationEvent
@@ -530,17 +534,17 @@ var AnimationManager = new Class({
530534
},
531535

532536
/**
533-
* Takes an array of Game Objects that have the Animation Component and then
537+
* Takes an array of Game Objects that have an Animation Component and then
534538
* starts the given animation playing on them, each one offset by the
535539
* `stagger` amount given to this method.
536540
*
537541
* @method Phaser.Animations.AnimationManager#staggerPlay
538542
* @since 3.0.0
539-
*
543+
*
540544
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
541545
*
542546
* @param {string} key - The key of the animation to play on the Game Objects.
543-
* @param {Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have the Animation Component.
547+
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component.
544548
* @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by.
545549
*
546550
* @return {Phaser.Animations.AnimationManager} This Animation Manager.

0 commit comments

Comments
 (0)