An activity for a simple float value.
More...
#include <gf/Activities.h>
An activity for a simple float value.
- See also
- gf::Tween
◆ ValueActivity()
| gf::ValueActivity::ValueActivity |
( |
float |
origin, |
|
|
float |
target, |
|
|
float & |
value, |
|
|
Time |
duration, |
|
|
Easing |
easing = Ease::linear |
|
) |
| |
Constructor.
- Parameters
-
| origin | The origin value |
| target | The target value |
| value | A reference on the value |
| duration | The duration of the tween |
| easing | The easing for the interpolation |
◆ getDuration()
| Time gf::ValueActivity::getDuration |
( |
| ) |
const |
|
inlinenoexcept |
Get the duration of the activity.
- Returns
- The current duration
◆ getOrigin()
| float gf::ValueActivity::getOrigin |
( |
| ) |
const |
|
inlinenoexcept |
Get the origin of the activity.
- Returns
- The current origin
◆ getTarget()
| float gf::ValueActivity::getTarget |
( |
| ) |
const |
|
inlinenoexcept |
Get the target of the activity.
- Returns
- The current target
◆ restart()
| void gf::ValueActivity::restart |
( |
| ) |
|
|
overridevirtual |
◆ run()
Run the activity.
- Parameters
-
| time | The time since the last run |
- Returns
- The status of the activity (running or finished)
Implements gf::Activity.
◆ setDuration()
| void gf::ValueActivity::setDuration |
( |
Time |
duration | ) |
|
|
inline |
Change the duration of the activity.
- Parameters
-
◆ setOrigin()
| void gf::ValueActivity::setOrigin |
( |
float |
origin | ) |
|
|
inline |
Change the origin of the activity.
- Parameters
-
◆ setTarget()
| void gf::ValueActivity::setTarget |
( |
float |
target | ) |
|
|
inline |
Change the target of the activity.
- Parameters
-