Jump to content

Best way of chaining timer events?


Recommended Posts

I'm trying to wrap my head around timers, and how would I do to chain sequential events. There's a number of options I could think of

  • Starting them all at the same time and have their durations to be incrementally bigger (so they're not actually chained per se, but timed in such a way that it achieves the same effect);
  • Adding each event as a callback of the previous one (maybe using something like promises to avoid callback hell);
  • Using a tween instead, which already has chaining built in with Tween.to().

Perhaps there's a simpler solution? Is there a built-in form of chaining events or I have to use one of the methods outlined above?

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.

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.


  • Recently Browsing   0 members

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