Tween animation class. More...
Inherits Polycode::EventDispatcher.
Inherited by Polycode::BezierPathTween, and Polycode::QuaternionTween.
Public Member Functions | |
Tween (Number *target, int easeType, Number startVal, Number endVal, Number time, bool repeat=false, bool deleteOnComplete=false) | |
Constructor. | |
void | handleEvent (Event *event) |
This method gets called by an EventDispatcher that the handler is listening to if the dispatching event's code matches the code that handler is listening for. | |
void | Pause (bool pauseVal) |
Pauses and resumes the tween. | |
void | Reset () |
Resets the tween to starting position. |
Tween animation class.
This class lets you tween a floating point value over a period of time with different easing types.
Tween::Tween | ( | Number * | target, | |
int | easeType, | |||
Number | startVal, | |||
Number | endVal, | |||
Number | time, | |||
bool | repeat = false , |
|||
bool | deleteOnComplete = false | |||
) |
Constructor.
target | Pointer to the Number to tween | |
easeType | Easing type. See the static members of this class for the different types of easing you can use. | |
startVal | Starting value of the number at tween's start. | |
endVal | The value to tween the number to. | |
time | The duration of the tween. | |
repeat | If true, this tween will repeat over and over. |
void Tween::handleEvent | ( | Event * | event | ) | [virtual] |
This method gets called by an EventDispatcher that the handler is listening to if the dispatching event's code matches the code that handler is listening for.
Typically, you subclass EventHandler and implement the handleEvent method to handle specific events.
Reimplemented from Polycode::EventHandler.
void Tween::Pause | ( | bool | pauseVal | ) |
Pauses and resumes the tween.
pauseVal | If true, pauses the tweem, if false, resumes it. |