aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ParticleEmitter.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/ParticleEmitter.hpp')
-rw-r--r--src/crepe/ParticleEmitter.hpp11
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