From de759b69a57c1f17e9c50da842c41af67df5d1d4 Mon Sep 17 00:00:00 2001 From: zacharysarette Date: Wed, 23 May 2018 21:01:07 +0900 Subject: [PATCH] Fixes a bug #3651 Describe the changes below: The tween animation was getting stuck when calling restart on it after being added. It now checks to see if this.state === TWEEN_CONST.PENDING_ADD in the tween restart function If true, sets this.seek(0) and this.parent.makeActive(this) This fixes the issue that makes the tween stuck when restarting the new tween directly after adding a the new tween. Updates to package.json and package-lock.json were undone from the last pull request. --- dist/phaser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/phaser.js b/dist/phaser.js index d40abd7ca..f91114a39 100644 --- a/dist/phaser.js +++ b/dist/phaser.js @@ -19045,7 +19045,7 @@ var Tween = new Class({ */ restart: function () { - if (this.state === TWEEN_CONST.REMOVED) + if (this.state === TWEEN_CONST.REMOVED || this.state === TWEEN_CONST.PENDING_ADD) { this.seek(0); this.parent.makeActive(this);