mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Fixed missing loop callback
This commit is contained in:
parent
14a6864f21
commit
34bf26592e
1 changed files with 12 additions and 0 deletions
|
@ -633,6 +633,7 @@ var Tween = new Class({
|
|||
* Internal method that advances to the next state of the Tween during playback.
|
||||
*
|
||||
* @method Phaser.Tweens.Tween#nextState
|
||||
* @fires Phaser.Tweens.Events#TWEEN_LOOP
|
||||
* @fires Phaser.Tweens.Events#TWEEN_COMPLETE
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
@ -653,6 +654,17 @@ var Tween = new Class({
|
|||
}
|
||||
else
|
||||
{
|
||||
this.emit(Events.TWEEN_LOOP, this, this.targets);
|
||||
|
||||
var onLoop = this.callbacks.onLoop;
|
||||
|
||||
if (onLoop)
|
||||
{
|
||||
onLoop.params[1] = this.targets;
|
||||
|
||||
onLoop.func.apply(onLoop.scope, onLoop.params);
|
||||
}
|
||||
|
||||
this.state = TWEEN_CONST.ACTIVE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue