Scales particles over time. More...
Public Types | |
typedef std::tr1::shared_ptr < ScaleAffector > | Ptr |
Shared pointer type referring to ScaleAffector objects. | |
Static Public Member Functions | |
static Ptr | Create (sf::Vector2f scaleFactor) |
Creates an affector that continuously scales particles by a given factor. | |
Public Member Functions | |
ScaleAffector (sf::Vector2f scaleFactor) | |
Constructor. | |
virtual void | Affect (Particle &particle, sf::Time dt) |
Affects particles. | |
void | SetScaleFactor (sf::Vector2f scaleFactor) |
Sets the factor by which particles are scaled every second. | |
sf::Vector2f | GetScaleFactor () const |
Returns the factor by which particles are scaled every second. |
Scales particles over time.
thor::ScaleAffector::ScaleAffector | ( | sf::Vector2f | scaleFactor | ) | [explicit] |
Constructor.
scaleFactor | Factor by which particles are scaled every second. |
virtual void thor::ScaleAffector::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::ScaleAffector::Create | ( | sf::Vector2f | scaleFactor | ) | [static] |
Creates an affector that continuously scales particles by a given factor.
scaleFactor | Factor by which particles are scaled every second. |