Fades particles in over time. More...

Public Types | |
|
typedef std::tr1::shared_ptr < FadeInAffector > | Ptr |
| Shared pointer type referring to FadeInAffector objects. | |
Static Public Member Functions | |
| static Ptr | Create (float timeRatio=1.f) |
| Creates an affector that increases the alpha value from the beginning of the particle lifetime. | |
Public Member Functions | |
| FadeInAffector (float timeRatio=1.f) | |
| Constructor. | |
| virtual void | Affect (Particle &particle, sf::Time dt) |
| Affects particles. | |
| void | SetTimeRatio (float timeRatio) |
| Sets the time ratio (how long the fade-out time is compared to the particle lifetime). | |
| float | GetTimeRatio () const |
| Returns the time ratio (how long the fade-out time is compared to the particle lifetime). | |
Fades particles in over time.
Affector class that constantly increases the alpha color value of a particle.
| thor::FadeInAffector::FadeInAffector | ( | float | timeRatio = 1.f | ) | [explicit] |
Constructor.
| timeRatio | How long the fade-in time is in comparison to the total particle lifetime. For example, 1.f means over the whole lifetime, and 0.25f means to fade in the particle only in the first quarter. |
| virtual void thor::FadeInAffector::Affect | ( | Particle & | particle, |
| sf::Time | dt | ||
| ) | [virtual] |
Affects particles.
| particle | The particle currently being affected. |
| dt | Time interval during which particles are affected. |
Implements thor::Affector.
| static Ptr thor::FadeInAffector::Create | ( | float | timeRatio = 1.f | ) | [static] |
Creates an affector that increases the alpha value from the beginning of the particle lifetime.
| timeRatio | How long the fade-in time is in comparison to the total particle lifetime. For example, 1.f means over the whole lifetime, and 0.25f means to fade in the particle only in the first quarter. |