mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Tween.Restart adds Tween back to the active list for the TweenManager to properly process and replay
This commit is contained in:
parent
8c996ca339
commit
edb81c9096
1 changed files with 10 additions and 2 deletions
|
@ -409,8 +409,16 @@ var Tween = new Class({
|
|||
*/
|
||||
restart: function ()
|
||||
{
|
||||
this.stop();
|
||||
this.play();
|
||||
if (this.state === TWEEN_CONST.REMOVED)
|
||||
{
|
||||
this.seek(0);
|
||||
this.parent.makeActive(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.stop();
|
||||
this.play();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue