mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 07:31:11 +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 ()
|
restart: function ()
|
||||||
{
|
{
|
||||||
this.stop();
|
if (this.state === TWEEN_CONST.REMOVED)
|
||||||
this.play();
|
{
|
||||||
|
this.seek(0);
|
||||||
|
this.parent.makeActive(this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.stop();
|
||||||
|
this.play();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue