diff options
Diffstat (limited to 'src/crepe/Particle.h')
-rw-r--r-- | src/crepe/Particle.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/crepe/Particle.h b/src/crepe/Particle.h new file mode 100644 index 0000000..21e691d --- /dev/null +++ b/src/crepe/Particle.h @@ -0,0 +1,22 @@ +#pragma once + +#include "Position.h" + +namespace crepe { + +class Particle { +public: + Position position; + // FIXME: `Position` is an awkward name for a 2D vector. See FIXME comment in + // api/Transform.h for fix proposal. + Position velocity; + float lifespan; + bool active; + + Particle(); + void reset(float lifespan, Position position, Position velocity); + void update(float deltaTime); + float time_in_life; +}; + +} // namespace crepe |