Lysa  0.0
Lysa 3D Engine
TweenSequence Class Reference

Detailed Description

Plays a list of Tweens sequentially, one after the other.

When the active Tween finishes mid-frame, the leftover delta is passed immediately to the next Tween so there is no one-frame gap between steps. An optional callback is invoked once the last Tween completes.

+ Inheritance diagram for TweenSequence:

Public Member Functions

 TweenSequence (std::vector< std::shared_ptr< Tween >> tweens, const Callback &callback=nullptr)
 
bool update (double deltaTime) override
 
bool isRunning () const override
 
void kill () override
 
- Public Member Functions inherited from Tween
virtual double getOverflow () const
 
virtual ~Tween () = default
 

Additional Inherited Members

- Public Typedefs inherited from Tween
using Callback = std::function< void ()>
 
- Protected Member Functions inherited from Tween
 Tween (const TransitionType type, const Callback &callback)
 
- Static Protected Member Functions inherited from Tween
static double applyEase (TransitionType type, double t)
 
- Protected Attributes inherited from Tween
bool running {false}
 
Callback callback
 
TransitionType interpolationType
 

Constructor & Destructor Documentation

TweenSequence ( std::vector< std::shared_ptr< Tween >>  tweens,
const Callback callback = nullptr 
)
inline

Creates a sequence from an ordered list of Tweens.

Parameters
tweensTweens to play in order; ownership is transferred.
callbackOptional function invoked when the last Tween completes.

Member Function Documentation

bool isRunning ( ) const
inlineoverridevirtual

Returns true while the Tween is still animating.

Reimplemented from lysa::Tween::isRunning()

void kill ( )
inlineoverridevirtual

Immediately stops the Tween without firing the completion callback.

Reimplemented from lysa::Tween::kill()

bool update ( double  deltaTime)
overridevirtual

Advances the Tween by delta time.

Parameters
deltaTimeTime elapsed since the previous update (seconds).
Returns
true when the Tween has finished, false while it is running.

Implements lysa::Tween::update()