aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ParticleEmitter.hpp
diff options
context:
space:
mode:
authorjaroWMR <jarorutjes07@gmail.com>2024-10-07 18:07:17 +0200
committerjaroWMR <jarorutjes07@gmail.com>2024-10-07 18:07:17 +0200
commit5f84969c851530ebc430be2cf8e99c945ff7a4a7 (patch)
tree9fcd2755dbfd456f20f0ad37c18c7281b81382b1 /src/crepe/ParticleEmitter.hpp
parent5cf5cf64d6f9597849ed5558da4f1bc201165fed (diff)
improved particle system from 90ms to ~ 0.7ms
Diffstat (limited to 'src/crepe/ParticleEmitter.hpp')
-rw-r--r--src/crepe/ParticleEmitter.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/ParticleEmitter.hpp b/src/crepe/ParticleEmitter.hpp
index f647c27..5de5e1e 100644
--- a/src/crepe/ParticleEmitter.hpp
+++ b/src/crepe/ParticleEmitter.hpp
@@ -3,13 +3,12 @@
#include <vector>
#include "Particle.hpp"
+
+
class ParticleEmitter {
public:
ParticleEmitter(unsigned int maxParticles, unsigned int emissionRate, unsigned int speed, unsigned int speedOffset, unsigned int angle, unsigned int angleOffset,float m_beginLifespan,float m_endLifespan);
- struct Position { //struct to hold position
- float x;
- float y;
- };
+ ~ParticleEmitter();
Position m_position; //position of the emitter
unsigned int m_maxParticles; //maximum number of particles
@@ -22,4 +21,5 @@ public:
float m_endLifespan; //begin Lifespan of particle
std::vector<Particle> particles; //collection of particles
+
};