26 BaseTween(infinite), mod(&mod), end(end), duration(duration), interp(interp) {
48 if (currentTime < duration) {
49 const float normTime = currentTime / duration;
virtual void reset() override
Reset the tween.
virtual void update(const float delta) override
Update the tween.
bool _infinite
Is the tween infinite ?
T interpolate(T a, T b, float t, Interpolation type)
Interpolate between two values.
bool _ended
Has the tween ended ?
Interpolation
Interpolate using functions.
Tween(T &mod, const T end, const float duration, const math::Interpolation interp, bool infinite=false)
Create a tween.