diff options
author | Jaro <jarorutjes07@gmail.com> | 2024-11-08 19:20:05 +0100 |
---|---|---|
committer | Jaro <jarorutjes07@gmail.com> | 2024-11-08 19:20:05 +0100 |
commit | d69adb5666fd6f73edbc6d410afcdf23c24e7c6b (patch) | |
tree | 00dd0280e603be5f67753fa1171582109b1065c4 /src/crepe/Particle.h | |
parent | 0feda3d123ff99a1b9e41837482268bebfd9140a (diff) |
particle updated
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 |