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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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