aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/ParticleEmitter.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-14 10:35:08 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-14 10:35:08 +0100
commita0c8c09c8c363b239d72bd16303395fb8c23b948 (patch)
treed6c5f15c00b3762848ac1427cd3e0d48e9779dec /src/crepe/api/ParticleEmitter.cpp
parent8850ba096b6b4ae2dc3a813620dd35433b3c6c55 (diff)
parentbe1e97bc7a494963ab1567492fafcda99e36f683 (diff)
Merge branch 'master' into niels/RenderingParticle
Diffstat (limited to 'src/crepe/api/ParticleEmitter.cpp')
-rw-r--r--src/crepe/api/ParticleEmitter.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp
index e7f298c..35f960d 100644
--- a/src/crepe/api/ParticleEmitter.cpp
+++ b/src/crepe/api/ParticleEmitter.cpp
@@ -1,18 +1,12 @@
#include "ParticleEmitter.h"
-#include "Particle.h"
using namespace crepe;
-ParticleEmitter::ParticleEmitter(uint32_t game_object_id, const Data & data)
- : Component(game_object_id), 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);
- }
-}