2 #include "../Vector2.h"
4 /// ***** Public Class Methods *****
5 Particle::Particle(const Vector2& pos, bool canDie)
6 : Entity(pos), canDie(canDie)
10 Particle::Particle(const Vector2& pos, float lifeTime)
11 : Entity(pos), lifeTime(lifeTime)
20 void Particle::update(float time_step)
27 lifeTime -= time_step;
28 isDead = lifeTime <= 0;
30 position += velocity * time_step;