mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Merge pull request #3539 from pixelpicosean/fix_animation_complete_event
Fix animationcomplete event name typo
This commit is contained in:
commit
f084178929
1 changed files with 8 additions and 8 deletions
|
@ -8,7 +8,7 @@ var Class = require('../../utils/Class');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is dispatched when an animation starts playing.
|
* This event is dispatched when an animation starts playing.
|
||||||
*
|
*
|
||||||
* @event Phaser.GameObjects.Components.Animation#onStartEvent
|
* @event Phaser.GameObjects.Components.Animation#onStartEvent
|
||||||
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
||||||
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
||||||
|
@ -16,7 +16,7 @@ var Class = require('../../utils/Class');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is dispatched when an animation repeats.
|
* This event is dispatched when an animation repeats.
|
||||||
*
|
*
|
||||||
* @event Phaser.GameObjects.Components.Animation#onRepeatEvent
|
* @event Phaser.GameObjects.Components.Animation#onRepeatEvent
|
||||||
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
||||||
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
||||||
|
@ -26,7 +26,7 @@ var Class = require('../../utils/Class');
|
||||||
/**
|
/**
|
||||||
* This event is dispatched when an animation updates. This happens when the animation frame changes,
|
* This event is dispatched when an animation updates. This happens when the animation frame changes,
|
||||||
* based on the animation frame rate and other factors like timeScale and delay.
|
* based on the animation frame rate and other factors like timeScale and delay.
|
||||||
*
|
*
|
||||||
* @event Phaser.GameObjects.Components.Animation#onUpdateEvent
|
* @event Phaser.GameObjects.Components.Animation#onUpdateEvent
|
||||||
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
||||||
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
||||||
|
@ -34,7 +34,7 @@ var Class = require('../../utils/Class');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is dispatched when an animation completes playing, either naturally or via Animation.stop.
|
* This event is dispatched when an animation completes playing, either naturally or via Animation.stop.
|
||||||
*
|
*
|
||||||
* @event Phaser.GameObjects.Components.Animation#onCompleteEvent
|
* @event Phaser.GameObjects.Components.Animation#onCompleteEvent
|
||||||
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
|
||||||
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
* @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame.
|
||||||
|
@ -281,7 +281,7 @@ var Animation = new Class({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal property tracking if this Animation is waiting to stop.
|
* Internal property tracking if this Animation is waiting to stop.
|
||||||
*
|
*
|
||||||
* 0 = No
|
* 0 = No
|
||||||
* 1 = Waiting for ms to pass
|
* 1 = Waiting for ms to pass
|
||||||
* 2 = Waiting for repeat
|
* 2 = Waiting for repeat
|
||||||
|
@ -625,7 +625,7 @@ var Animation = new Class({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the amount of delay between repeats, if any.
|
* Gets the amount of delay between repeats, if any.
|
||||||
*
|
*
|
||||||
* @method Phaser.GameObjects.Components.Animation#getRepeatDelay
|
* @method Phaser.GameObjects.Components.Animation#getRepeatDelay
|
||||||
* @since 3.4.0
|
* @since 3.4.0
|
||||||
*
|
*
|
||||||
|
@ -700,7 +700,7 @@ var Animation = new Class({
|
||||||
|
|
||||||
var gameObject = this.parent;
|
var gameObject = this.parent;
|
||||||
|
|
||||||
gameObject.emit('animtioncomplete', this.currentAnim, this.currentFrame);
|
gameObject.emit('animationcomplete', this.currentAnim, this.currentFrame);
|
||||||
|
|
||||||
return gameObject;
|
return gameObject;
|
||||||
},
|
},
|
||||||
|
@ -830,7 +830,7 @@ var Animation = new Class({
|
||||||
return this.currentAnim.completeAnimation(this);
|
return this.currentAnim.completeAnimation(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.accumulator >= this.nextTick)
|
if (this.accumulator >= this.nextTick)
|
||||||
{
|
{
|
||||||
this.currentAnim.setFrame(this);
|
this.currentAnim.setFrame(this);
|
||||||
|
|
Loading…
Reference in a new issue