Skip to content

Tween code cleanup #27

@thaaks

Description

@thaaks

Tween and Tweener and involved classes like Ease and *Motion need code cleanup.
Tween and Tweener should not need to know about Entity and should not require an entity as a method parameter. Instead they need to have a proper startingPosition set. That's it.

Method apply() should be renamed to update() and also get the delta value as parameter.

Tweens should be modified to allow usage of delta instead of tick based counting. Also duration should be a value in ticks OR in milliseconds, similar to the solution in my Alarm class. Pretty simple.

I'm wondering if start() and pause() and so on should only affect the current Tween or simply all of them. If they affect only one tween I want to pass the Tween as parameter maybe. And not just rely on the internal variable current...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions