Closed kevinfoley closed 7 years ago
I'm not opposed to this, might be a good idea! What do others say? Please chime in!
BTW, just for reference: my recommendation is to create your own jugglers in real apps, so that you can split all time-based logic depending on their components (e.g. menu, gui-overlay, etc). In that case, scaling the time is easy: you can call juggler.advanceTime()
with the appropriate scale factor. But of course, that doesn't work with the (static) default juggler.
Sounds like a cool feature to me! Currently I'm using a getter for time that actually does the same thing - returns scaled time depending on various things, but having this feature built in would be nice.
Done! Please let me know if that's how you wanted it. :smile:
Looks great, thanks!
This is based on the Time.timeScale property in Unity: Add a timeScale propery to the Juggler; when the Juggler calls "advanceTime" on an IAnimatable, the "time" argument passed to advanceTime() is multiplied by the timeScale. This way you can easily speed up, slow down, or even freeze animations that utilize the time argument.