diff options
Diffstat (limited to 'src/crepe/Particle.h')
-rw-r--r-- | src/crepe/Particle.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/crepe/Particle.h b/src/crepe/Particle.h index 21e691d..f52196c 100644 --- a/src/crepe/Particle.h +++ b/src/crepe/Particle.h @@ -1,22 +1,24 @@ #pragma once -#include "Position.h" +#include "api/Transform.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; + Vector2 position; + Vector2 velocity; + Vector2 force_over_time; + uint32_t lifespan; + bool active = false; + uint32_t time_in_life = 0; + double angle; - Particle(); - void reset(float lifespan, Position position, Position velocity); - void update(float deltaTime); - float time_in_life; + Particle() = default; + void reset(uint32_t lifespan, Vector2 position, Vector2 velocity,double angle); + void update(); + void stop_movement(); + }; } // namespace crepe |