diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-11-13 19:00:29 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-11-13 19:00:29 +0100 |
commit | 1d4b3a44c9ce1e69f4f0e3909998225f8af3fea2 (patch) | |
tree | 9ce098dee89a3f12cbd103e1e944b4a429e35b14 /src/crepe/api | |
parent | e42d0877592aa1e88afbe0bc65822cd53a82205d (diff) |
fixed feedback
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/ParticleEmitter.cpp | 9 | ||||
-rw-r--r-- | src/crepe/api/ParticleEmitter.h | 5 |
2 files changed, 3 insertions, 11 deletions
diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp index e7f298c..7032f9e 100644 --- a/src/crepe/api/ParticleEmitter.cpp +++ b/src/crepe/api/ParticleEmitter.cpp @@ -3,16 +3,9 @@ using namespace crepe; -ParticleEmitter::ParticleEmitter(uint32_t game_object_id, const Data & data) +ParticleEmitter::ParticleEmitter(game_object_id_t game_object_id, const Data & data) : Component(game_object_id), data(data) { for (size_t i = 0; i < this->data.max_particles; i++) { this->data.particles.emplace_back(); } } - -ParticleEmitter::~ParticleEmitter() { - std::vector<Particle>::iterator it = this->data.particles.begin(); - while (it != this->data.particles.end()) { - it = this->data.particles.erase(it); - } -} diff --git a/src/crepe/api/ParticleEmitter.h b/src/crepe/api/ParticleEmitter.h index 83a1588..6e29e60 100644 --- a/src/crepe/api/ParticleEmitter.h +++ b/src/crepe/api/ParticleEmitter.h @@ -48,7 +48,7 @@ public: //! position of the emitter Vector2 position; //! maximum number of particles - const uint32_t max_particles = 0; + const unsigned int max_particles = 0; //! rate of particle emission per update (Lowest value = 0.001 any lower is ignored) double emission_rate = 0; //! min speed of the particles @@ -80,8 +80,7 @@ public: * \param game_object_id Identifier for the game object using this emitter. * \param data Configuration data defining particle properties. */ - ParticleEmitter(uint32_t game_object_id, const Data & data); - ~ParticleEmitter(); + ParticleEmitter(game_object_id_t game_object_id, const Data & data); public: //! Configuration data for particle emission settings. |