mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 15:41:37 +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
|
@ -408,9 +408,17 @@ var Tween = new Class({
|
|||
* @since 3.0.0
|
||||
*/
|
||||
restart: function ()
|
||||
{
|
||||
if (this.state === TWEEN_CONST.REMOVED)
|
||||
{
|
||||
this.seek(0);
|
||||
this.parent.makeActive(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.stop();
|
||||
this.play();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue