From d001c4ba95a72f13c942f1a24eb98fe1584d93a4 Mon Sep 17 00:00:00 2001 From: jaroWMR Date: Thu, 10 Oct 2024 08:38:40 +0200 Subject: Renamed files and Emitter is a component --- src/crepe/ParticleEmitter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/crepe/ParticleEmitter.cpp') 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 -#include "Particle.hpp" +#include "Particle.h" #include -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(std::time(nullptr))); // initialize random seed + std::srand(static_cast(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 -- cgit v1.2.3