Source Code Progress as of Day 3

GitHub - yjlintw/Tweenie at blog-day3

Unity_qmqvrwWXS9.gif

New Tweener Control Methods - Stop, Pause, Play and more

::: warning 🚨

Some Refactor is needed

The code design might need to be rethought. Currently, only StopAfterStepComplete's calling direction is different than the other Tweener Control Functions. All other tweener controls have their implementation in the Tweenie class, and the Tweener counterpart calls Tweenie's, because whether a Tweener is playing or stopped is handled by Tweenie, where we move those tweeners to different HashSets (toAddSet, toPauseSet, toStopSet, toCompleteSet). However, StopAfterStepComplete has its implementation in the Tweener class, and the Tweenie counterpart is calling Tweener's function because Tweenie has no understanding of where the Tweener's progress is at. A better design might be necessary to ensure that all control functions have the same calling direction.

:::

New Looping Capability

Now, Tweenie supports looping in both a fixed amount of times and an infinite manner. Additionally, there are two loop modes available: the Default mode and PingPong mode.

Looping with AnimationCurve

To loop with an AnimationCurve, simply call SetEase with the desired curve. The Tweener will loop according to the curve's values.