diff options
author | jaroWMR <jarorutjes07@gmail.com> | 2024-10-07 16:02:09 +0200 |
---|---|---|
committer | jaroWMR <jarorutjes07@gmail.com> | 2024-10-07 16:02:09 +0200 |
commit | 096e0d0a7199ec9a4059fd5ef8a06a3cf8fcae83 (patch) | |
tree | e88e612ac8836ad14abf6b6daff5f2508f0456b2 /src/crepe/ParticleEmitter.hpp | |
parent | 094ce1806156e191ffb554d4e88e636421cb0242 (diff) |
created a particel system
Diffstat (limited to 'src/crepe/ParticleEmitter.hpp')
-rw-r--r-- | src/crepe/ParticleEmitter.hpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/crepe/ParticleEmitter.hpp b/src/crepe/ParticleEmitter.hpp index 9b3f2ad..6826531 100644 --- a/src/crepe/ParticleEmitter.hpp +++ b/src/crepe/ParticleEmitter.hpp @@ -6,21 +6,14 @@ class ParticleEmitter { public: ParticleEmitter(unsigned int maxParticles, unsigned int emissionRate, unsigned int speed, unsigned int speedOffset, unsigned int angle, unsigned int angleOffset); - void update(float deltaTime); // Keep deltaTime as float - const std::vector<Particle>& getParticles() const; //returns the collection of particles - void setPosition(int x, int y); //sets the position of the emitter -private: - void emitParticle(); //emits a new particle - struct Position { //struct to hold position - int x; - int y; + float x; + float y; }; Position m_position; //position of the emitter unsigned int m_maxParticles; //maximum number of particles unsigned int m_emissionRate; //rate of particle emission - float m_elapsedTime; //elapsed time since the last emission unsigned int m_speed; //base speed of the particles unsigned int m_speedOffset; //offset for random speed variation unsigned int m_minAngle; //min angle of particle emission |