Merge pull request #4087 from TadejZupancic/patch-1

Tween inside Timeline fix
This commit is contained in:
Richard Davey 2019-04-08 12:13:27 +01:00 committed by GitHub
commit e53a0a1de2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -944,8 +944,16 @@ var Tween = new Class({
{
if (this.state === TWEEN_CONST.PAUSED || this.state === TWEEN_CONST.PENDING_ADD)
{
this.parent._destroy.push(this);
this.parent._toProcess++;
if (this.parentIsTimeline)
{
this.parent.manager._destroy.push(this);
this.parent.manager._toProcess++;
}
else
{
this.parent._destroy.push(this);
this.parent._toProcess++;
}
}
this.state = TWEEN_CONST.PENDING_REMOVE;