Jump to content

Fast-forward tween


mjohnsonengr
 Share

Recommended Posts

Hi,

 

I have a menu animation that plays for a total of about 3 seconds before menu items are usable.  I use a set of chained tweens to accomplish this.  Ideally, I would like for any input to instantly complete the tweens and put everything in their final positions.

 

One possible idea which I am probably going to roll with is to store the final position of everything as a member variable of my menu state, and add an input listener that stops all the tweens and places everything in its final position, and then call registerInput() which registers all the input handlers for the menu.  This normally would have been called in the last tween's onComplete method.

 

Question: Is there any built-in functionality to help me with this?  I've searched through the API docs and nothing has stuck out.  Some of the types of things I was looking for:

  • something in TweenManager to finish everything (basically a single method to do everything I've described above)
  • something in Tween to do the "fast-forward"; skip to the final position and call onComplete()

Does anyone have any better ideas on this?

Link to comment
Share on other sites

Your solution is pretty much what I do: I know what I'm tweening "to", so if there's any input I set the values directly and stop the tween. I don't have a better answer than that, though "fast forwarding" a tween could be an interesting utility to have.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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