PropertyAnimation
Inherited: None
Description
PropertyAnimation interpolates animated property between key-frames.
PropertyAnimation anim;
anim.setLoopDuration(1000);
MyObject object;
anim.setTarget(&object, "position");
anim.setKeyFrames({ KeyFrame(0.0f, Vector2(0.0f, 0.0f)),
KeyFrame(1.0f, Vector2(1.0f, 2.0f)) });
anim.start();
Public Methods
defaultValue () const |
|
void |
setCurrentValue (const Variant & value) |
void |
setTarget (Object * object, const char * property) |
void |
setValid (bool valid) |
const Object * |
target () const |
const char |
targetProperty () const |
Static Methods
None
Methods Description
Variant PropertyAnimation::defaultValue () const
Returns the default value of the animated property.
void PropertyAnimation::setCurrentValue (Variant & value)
Reimplements: VariantAnimation::setCurrentValue(const Variant &value).
This is an overloaded function.
Sets the new current value for the animated Variant. And updates animated property of the object.
void PropertyAnimation::setTarget (Object * object, char * property)
Sets the new animated property of the object.
See also target().
void PropertyAnimation::setValid (bool valid)
Reimplements: Animation::setValid(bool valid).
This is an overloaded function.
Sets the valid state of animation. The invalid animations will not affect anything.
const Object * PropertyAnimation::target () const
Returns the root object of the animated property.
See also setTarget().
const char PropertyAnimation::targetProperty () const
Returns the name of animates property of the object.