aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/ParticleEmitter.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 14:17:25 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 14:17:25 +0100
commite70c2a3a4a7f636f190cc64792029cadd3613337 (patch)
tree8371b0e067430db780b72638eb61555869641979 /src/crepe/api/ParticleEmitter.cpp
parent68be6b67f79413cb4af0ca15262ca1547a7d0d41 (diff)
parent9957da232e7c96f7f88a7ab0edfa4aaf560d1c00 (diff)
Merge branch 'master' into niels/UI
Diffstat (limited to 'src/crepe/api/ParticleEmitter.cpp')
-rw-r--r--src/crepe/api/ParticleEmitter.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp
index 90b77a0..4f54bbd 100644
--- a/src/crepe/api/ParticleEmitter.cpp
+++ b/src/crepe/api/ParticleEmitter.cpp
@@ -1,11 +1,14 @@
#include "ParticleEmitter.h"
+#include "api/Sprite.h"
using namespace crepe;
-ParticleEmitter::ParticleEmitter(game_object_id_t game_object_id, const Data & data)
+ParticleEmitter::ParticleEmitter(game_object_id_t game_object_id, const Sprite & sprite,
+ const Data & data)
: Component(game_object_id),
+ sprite(sprite),
data(data) {
for (size_t i = 0; i < this->data.max_particles; i++) {
- this->data.particles.emplace_back();
+ this->particles.emplace_back();
}
}