tonihele / OpenKeeper

Dungeon Keeper II remake
GNU General Public License v3.0
433 stars 41 forks source link

Migrate to the new animation system #412

Closed Trass3r closed 1 year ago

Trass3r commented 2 years ago

Found this old #362 branch and rebased fwiw.

tonihele commented 2 years ago

What is the status of this? I didn't try the code yet, do the different animation modes still work?

Trass3r commented 2 years ago

So far I couldn't spot any regressions. But please feel free to test it yourself.

tonihele commented 1 year ago

On 3.6 jME there will be native tweens for the deprecated loop modes. So lets look at this then.

Trass3r commented 1 year ago

I see. https://github.com/jMonkeyEngine/jmonkeyengine/releases/tag/v3.6.0-alpha1

Trass3r commented 1 year ago

Would we need to use AnimLayer then? https://github.com/jMonkeyEngine/jmonkeyengine/pull/1845

tonihele commented 1 year ago

Hmm, not sure, it was this PR https://github.com/jMonkeyEngine/jmonkeyengine/pull/1849/files.

Trass3r commented 1 year ago

Some enhancement to new animation system by @Ali-RS in https://github.com/jMonkeyEngine/jmonkeyengine/pull/1845

Added a Loop tween to Tweens factory class. Supports looping by count… by @Ali-RS in https://github.com/jMonkeyEngine/jmonkeyengine/pull/1846

Added Tweens.cycle() and Tweens.invert() methods by @Ali-RS in https://github.com/jMonkeyEngine/jmonkeyengine/pull/1849

Trass3r commented 1 year ago

It has landed: https://github.com/jMonkeyEngine/jmonkeyengine/releases/tag/v3.6.0-stable

tonihele commented 1 year ago

Yeah, I finally got around to test this. It seems to work.

I tried to use the Tween.cycle in the AnimationLoader rather than tamper with the Global Animation Speed. But that resulted in doors spawning as opened. Well, need to check this at some point.

So yes, fine by me. Ready to merge?