Changes an object's color smoothly over time.
More...
Changes an object's color smoothly over time.
This class stores a ColorGradient which is applied to animated objects.
thor::ColorAnimation::ColorAnimation |
( |
const ColorGradient & |
gradient | ) |
|
|
explicit |
Constructor.
- Parameters
-
gradient | The color gradient affecting the objects. Can also be a single sf::Color. |
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: