Skip to content

Commit da0d980

Browse files
committed
Fixed typo
1 parent 2fe4d53 commit da0d980

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/gameobjects/components/Animation.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)