Skip to content

Commit de759b6

Browse files
Fixes a bug phaserjs#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.
1 parent 6af861b commit de759b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dist/phaser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19045,7 +19045,7 @@ var Tween = new Class({
1904519045
*/
1904619046
restart: function ()
1904719047
{
19048-
if (this.state === TWEEN_CONST.REMOVED)
19048+
if (this.state === TWEEN_CONST.REMOVED || this.state === TWEEN_CONST.PENDING_ADD)
1904919049
{
1905019050
this.seek(0);
1905119051
this.parent.makeActive(this);

0 commit comments

Comments
 (0)