/// ***** Constructors/Destructors *****
Particle::Particle(const Vector2& pos, bool canDie)
- : Entity(pos), canDie(canDie)
+ : Entity(pos), m_canDie(canDie)
{
}
Particle::Particle(const Vector2& pos, float lifeTime)
- : Entity(pos), lifeTime(lifeTime)
+ : Entity(pos), m_lifeTime(lifeTime)
{
}
void Particle::update(float time_step)
{
- if(isDead)
+ if(m_isDead)
return;
- if (canDie)
+ if (m_canDie)
{
- lifeTime -= time_step;
- isDead = lifeTime <= 0;
+ m_lifeTime -= time_step;
+ m_isDead = m_lifeTime <= 0;
}
position += velocity * time_step;
}