An activity for a change of position.
More...
#include <gf/Activities.h>
An activity for a change of position.
- See also
- gf::Tween
◆ MoveToActivity()
Constructor.
- Parameters
-
origin | The origin value |
target | The target value |
position | A reference on the value |
duration | The duration of the tween |
easing | The easing for the interpolation |
◆ getDuration()
Time gf::MoveToActivity::getDuration |
( |
| ) |
const |
|
inlinenoexcept |
Get the duration of the activity.
- Returns
- The current duration
◆ getOrigin()
Vector2f gf::MoveToActivity::getOrigin |
( |
| ) |
const |
|
inlinenoexcept |
Get the origin of the activity.
- Returns
- The current origin
◆ getTarget()
Vector2f gf::MoveToActivity::getTarget |
( |
| ) |
const |
|
inlinenoexcept |
Get the target of the activity.
- Returns
- The current target
◆ restart()
void gf::MoveToActivity::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::MoveToActivity::setDuration |
( |
Time |
duration | ) |
|
|
inline |
Change the duration of the activity.
- Parameters
-
◆ setOrigin()
void gf::MoveToActivity::setOrigin |
( |
Vector2f |
origin | ) |
|
|
inline |
Change the origin of the activity.
- Parameters
-
◆ setTarget()
void gf::MoveToActivity::setTarget |
( |
Vector2f |
target | ) |
|
|
inline |
Change the target of the activity.
- Parameters
-