File tree Expand file tree Collapse file tree
src/gameobjects/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,8 +46,6 @@ var Class = require('../../utils/Class');
4646 *
4747 * You can also listen for a specific animation by appending a hyphen and its key to the event name. For example,
4848 * if you have an animation called `explode`, you can listen for `sprite.on('animationrepeat-explode', listener)`.
49- *
50- * You can also listen for the `repeat` event from the Animation itself: `animation.on('repeat', listener)`.
5149 *
5250 * @event Phaser.GameObjects.Components.Animation#onRepeatEvent
5351 * @param {Phaser.Animations.Animation } animation - Reference to the currently playing animation.
@@ -902,7 +900,7 @@ var Animation = new Class({
902900 var anim = this . currentAnim ;
903901 var frame = this . currentFrame ;
904902
905- anim . on ( 'complete' , anim , frame ) ;
903+ anim . emit ( 'complete' , anim , frame ) ;
906904
907905 gameObject . emit ( 'animationcomplete-' + anim . key , anim , frame , gameObject ) ;
908906
You can’t perform that action at this time.
0 commit comments