Changes an object's color smoothly over time.
More...
List of all members.
Public Member Functions |
| ColorAnimation (const ColorGradient &gradient) |
| Constructor.
|
template<class Animated > |
void | operator() (Animated &animated, float progress) const |
| Animates the object.
|
Detailed Description
Changes an object's color smoothly over time.
This class stores a ColorGradient which is applied to animated objects.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
gradient | The color gradient affecting the objects. Can also be a single sf::Color. |
Member Function Documentation
template<class Animated >
void thor::ColorAnimation::operator() |
( |
Animated & |
animated, |
|
|
float |
progress |
|
) |
| const |
Animates the object.
- Parameters:
-
animated | Object to colorize according to the color gradient. |
progress | Value in [0,1] determining the progress of the animation. |
- Template Parameters:
-
Animated | Type of animated object. The function thor::setColor() is invoked for it. |
The documentation for this class was generated from the following file: