Skip to content
patrickklug edited this page Feb 28, 2018 · 2 revisions

Since version 1.6.0 the game includes the Greensock GSAP animation library. The exact libraries can be found in the games installation folder under /libs/greensock but they include TweenMax, jquery.gsap as well as several plugins like Kinetic/Throw, Draggable and CustomEase.

Game Dev Tycoon mods can use these libraries by default.

We also added a special method that allows you to play a TimeLine in gametime, rather than real time. To do this just add the timeline via GameManager.addGsapAnimationToGameTime(tl);.

Note that this will call pause/resume as well as dynamically adjust the timeScale() to reflect the games time on your timeline so don't set the timeScale by yourself.

Please also note that when loading a game we can't magically restore your animations because we can't restore callbacks and find your UI elements. If you need animation state to be persisted between saves, you'll have to re-create your animations on load, then re-add them to the GameManager.addGsapAnimationToGameTime(tl); method.

To forward your animations to the correct game-time, you can remember the GameManager.gameTime at the start of the animation and calculate the delta, then forward the animation via GSAP's .totalTime() method (documentation).

Clone this wiki locally