Jump to content

can't delay at the start of a tween


InsaneHero
 Share

Recommended Posts

I can't find the change responsible in the commit logs, but until recently I was able to delay the start of a tween:

game.add.tween(this.tbt).delay(1000).to({alpha:1.0}, 500, Phaser.Easing.Linear.None, true);

After updating my dev branch today, this now fails in the delay function (the access of timeline[index].delay is invalid if index = 0 and timeline is an empty array).

this.timeline[index].delay = duration;

I suspect this must be a side-effect of some other recent tween changes.   I'll keep looking but maybe someone will go "aha" and know what the problem or fix is (/fingerscrossed).

 

Link to comment
Share on other sites

Ah, ok... I just diffed the dev branch and my old stable version and I see that the entire approach to tweening has changed recently.  'timeline' didn't even exist previously.

I suspect that this is a corner case that wasn't caught during the change.

 

 

It looks like it might work if I just do the delay AFTER the .to

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...