Reverted ParticleSystem:setPosition’s functionality to 0.9.0’s beheaviour, added ParticleSystem:moveTo which has the new behaviour (new particles spawn in a line between the old position and where the emitter was moved to.)

This commit is contained in:
Alex Szpakowski
2014-01-28 03:20:08 -04:00
parent 6b538b5827
commit a7ed581204
4 changed files with 26 additions and 0 deletions
@@ -474,6 +474,7 @@ void ParticleSystem::getParticleLifetime(float *min, float *max) const
void ParticleSystem::setPosition(float x, float y)
{
position = love::Vector(x, y);
prevPosition = position;
}
const love::Vector &ParticleSystem::getPosition() const
@@ -481,6 +482,11 @@ const love::Vector &ParticleSystem::getPosition() const
return position;
}
void ParticleSystem::moveTo(float x, float y)
{
position = love::Vector(x, y);
}
void ParticleSystem::setAreaSpread(AreaSpreadDistribution distribution, float x, float y)
{
areaSpread = love::Vector(x, y);