Common interface for all tweeners. More...
#include <base_tweener.hpp>
Public Types | |
typedef std::function< void()> | finish_callback |
The type of the function called to notify the end of the tweener. | |
Public Member Functions | |
virtual | ~base_tweener () |
Destructor. | |
base_tweener * | clone () const |
Create a copy of this allocated with new. | |
bool | is_finished () const |
Tell if the tweener has reached his total duration. | |
double | update (double dt) |
Update the base_tweener of a given amount of time. | |
void | on_finished (finish_callback f) |
Execute the callbacks notifying about the finish of the tweener. | |
Common interface for all tweeners.
Definition at line 44 of file base_tweener.hpp.
typedef std::function<void()> claw::tween::base_tweener::finish_callback |
The type of the function called to notify the end of the tweener.
Definition at line 51 of file base_tweener.hpp.
|
virtual |
Destructor.
Definition at line 36 of file base_tweener.cpp.
claw::tween::base_tweener * claw::tween::base_tweener::clone | ( | ) | const |
Create a copy of this allocated with new.
Definition at line 42 of file base_tweener.cpp.
bool claw::tween::base_tweener::is_finished | ( | ) | const |
Tell if the tweener has reached his total duration.
Definition at line 50 of file base_tweener.cpp.
void claw::tween::base_tweener::on_finished | ( | finish_callback | f | ) |
Execute the callbacks notifying about the finish of the tweener.
Definition at line 78 of file base_tweener.cpp.
double claw::tween::base_tweener::update | ( | double | dt | ) |
Update the base_tweener of a given amount of time.
dt | The duration of the update in time units since the last call. |
Definition at line 60 of file base_tweener.cpp.