3 #include "../Vector2.h"
6 /// ***** Constructors/Destructors *****
8 Particle::Particle(const Vector2& pos, bool canDie)
9 : Entity(pos), canDie(canDie)
13 Particle::Particle(const Vector2& pos, float lifeTime)
14 : Entity(pos), lifeTime(lifeTime)
23 /// ***** Public Class Methods *****
25 void Particle::update(float time_step)
32 lifeTime -= time_step;
33 isDead = lifeTime <= 0;
35 position += velocity * time_step;