aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ParticleEmitter.cpp
diff options
context:
space:
mode:
authorjaroWMR <jarorutjes07@gmail.com>2024-10-10 08:38:40 +0200
committerjaroWMR <jarorutjes07@gmail.com>2024-10-10 08:38:40 +0200
commitd001c4ba95a72f13c942f1a24eb98fe1584d93a4 (patch)
tree8d72f1ddf9baf591fdf99397aa1495a219d35d35 /src/crepe/ParticleEmitter.cpp
parent163c9e3eea437daa8ef6007fbdf2f91470066cbf (diff)
Renamed files and Emitter is a component
Diffstat (limited to 'src/crepe/ParticleEmitter.cpp')
-rw-r--r--src/crepe/ParticleEmitter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/crepe/ParticleEmitter.cpp b/src/crepe/ParticleEmitter.cpp
index 3c9cc4e..9ae5e76 100644
--- a/src/crepe/ParticleEmitter.cpp
+++ b/src/crepe/ParticleEmitter.cpp
@@ -1,11 +1,13 @@
-#include "ParticleEmitter.hpp"
+#include "ParticleEmitter.h"
#include <ctime>
-#include "Particle.hpp"
+#include "Particle.h"
#include <iostream>
-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)
+using namespace crepe;
+
+ParticleEmitter::ParticleEmitter(uint32_t maxParticles, uint32_t emissionRate, uint32_t speed, uint32_t speedOffset, uint32_t angle, uint32_t 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
+ std::srand(static_cast<uint32_t>(std::time(nullptr))); // initialize random seed
std::cout << "Create emitter" << std::endl;
m_minAngle = (360 + angle - (angleOffset % 360)) % 360; // calculate minAngle
m_maxAngle = (360 + angle + (angleOffset % 360)) % 360; // calculate maxAngle