aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ParticleEmitter.cpp
diff options
context:
space:
mode:
authorjaroWMR <jarorutjes07@gmail.com>2024-10-07 16:39:26 +0200
committerjaroWMR <jarorutjes07@gmail.com>2024-10-07 16:39:26 +0200
commit5cf5cf64d6f9597849ed5558da4f1bc201165fed (patch)
treeb0b02e8b71c5e8e5afba4212daa999c5cc04bd26 /src/crepe/ParticleEmitter.cpp
parent096e0d0a7199ec9a4059fd5ef8a06a3cf8fcae83 (diff)
updated system
Diffstat (limited to 'src/crepe/ParticleEmitter.cpp')
-rw-r--r--src/crepe/ParticleEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/ParticleEmitter.cpp b/src/crepe/ParticleEmitter.cpp
index 69f5ace..f5c18db 100644
--- a/src/crepe/ParticleEmitter.cpp
+++ b/src/crepe/ParticleEmitter.cpp
@@ -1,8 +1,8 @@
#include "ParticleEmitter.hpp"
#include <ctime>
-ParticleEmitter::ParticleEmitter(unsigned int maxParticles, unsigned int emissionRate, unsigned int speed, unsigned int speedOffset, unsigned int angle, unsigned int angleOffset)
- : m_maxParticles(maxParticles), m_emissionRate(emissionRate), m_speed(speed), m_speedOffset(speedOffset), m_position{0, 0} {
+ParticleEmitter::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)
+ : m_maxParticles(maxParticles), m_emissionRate(emissionRate), m_speed(speed), m_speedOffset(speedOffset), m_position{0, 0}, m_beginLifespan(m_beginLifespan),m_endLifespan(m_endLifespan) {
std::srand(static_cast<unsigned int>(std::time(nullptr))); // initialize random seed
m_minAngle = (360 + angle - (angleOffset % 360)) % 360; // calculate minAngle