diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-07 22:44:35 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-07 22:44:35 +0100 |
commit | 8c81bf4a33a13fc21dca7e3fe78a6dc334ac964b (patch) | |
tree | 591cf1d62731c6f206a9a54d011ddf462631c41a /src/crepe/Particle.h | |
parent | 31e4ba33bec0cc5c33d9668cd0244972523bf8ad (diff) |
changed spawnrate of particles (bound to delta time)
Diffstat (limited to 'src/crepe/Particle.h')
-rw-r--r-- | src/crepe/Particle.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crepe/Particle.h b/src/crepe/Particle.h index 4fa93a1..49fec1f 100644 --- a/src/crepe/Particle.h +++ b/src/crepe/Particle.h @@ -24,11 +24,11 @@ public: //! Accumulated force affecting the particle over time. vec2 force_over_time; //! Total lifespan of the particle in milliseconds. - unsigned int lifespan; + float lifespan; //! Active state of the particle; true if it is in use, false otherwise. bool active = false; //! The time the particle has been alive, in milliseconds. - unsigned int time_in_life = 0; + float time_in_life = 0; //! The angle at which the particle is oriented or moving. float angle = 0; @@ -49,8 +49,9 @@ public: * * Advances the particle's position based on its velocity and applies accumulated forces. * Deactivates the particle if its lifespan has expired. + * \param dt The amount of fixed delta time that has passed. */ - void update(); + void update(double dt); /** * \brief Stops the particle's movement. * |