Commit | Line | Data |
---|---|---|
ad9f1fb6 PG |
1 | #ifndef PARTICLE_H |
2 | #define PARTICLE_H | |
3 | ||
4 | #include "Entity.h" | |
5 | #include "../Vector2.h" | |
6 | ||
617dcc71 | 7 | |
ad9f1fb6 PG |
8 | /// NOTE to SELF |
9 | // a Particle should be drawn for at least the next frame | |
10 | // ie. creating a particle using ParticleE(Vector2), | |
11 | // should draw the particle once THEN kill it | |
12 | ||
617dcc71 | 13 | |
ad9f1fb6 | 14 | /// ***** Header Class ***** |
617dcc71 | 15 | |
ad9f1fb6 PG |
16 | class Particle: public Entity |
17 | { | |
18 | protected: | |
5f1f55d1 PG |
19 | Particle(const Vector2&, bool=true); |
20 | Particle(const Vector2&, float); | |
ad9f1fb6 PG |
21 | |
22 | public: | |
23 | virtual ~Particle(); | |
24 | ||
25 | virtual void update(float); | |
26 | ||
27 | protected: | |
28 | float lifeTime; | |
29 | ||
30 | bool isDead; | |
31 | bool canDie; | |
32 | }; | |
33 | ||
34 | #endif // PARTICLE_H |