Polycode::Tween Class Reference

Tween animation class. More...

Inherits Polycode::EventDispatcher.

Inherited by Polycode::BezierPathTween, and Polycode::QuaternionTween.

List of all members.

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.

Detailed Description

Tween animation class.

This class lets you tween a floating point value over a period of time with different easing types.


Constructor & Destructor Documentation

Tween::Tween ( Number *  target,
int  easeType,
Number  startVal,
Number  endVal,
Number  time,
bool  repeat = false,
bool  deleteOnComplete = false 
)

Constructor.

Parameters:
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.

Member Function Documentation

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.

See also:
EventDispatcher

Reimplemented from Polycode::EventHandler.

void Tween::Pause ( bool  pauseVal  ) 

Pauses and resumes the tween.

Parameters:
pauseVal If true, pauses the tweem, if false, resumes it.
Generated on Sat Aug 11 18:04:12 2012 for Polycode by  doxygen 1.6.3