aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/ParticleEmitter.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-17 15:20:29 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-17 15:20:29 +0100
commitba99bcbac33d05bc2067c9211c0fe453b2930a8d (patch)
treea032c8268fece08866d7f398bf781fd356560579 /src/crepe/api/ParticleEmitter.cpp
parent45a1ab16f29e85de7c2df8832f51967c10c43e92 (diff)
parent9232a98b72eee7af4f7f2153c1b2ccedbfa4cc65 (diff)
merge master
Diffstat (limited to 'src/crepe/api/ParticleEmitter.cpp')
-rw-r--r--src/crepe/api/ParticleEmitter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp
index a9c5cf6..9a70334 100644
--- a/src/crepe/api/ParticleEmitter.cpp
+++ b/src/crepe/api/ParticleEmitter.cpp
@@ -1,13 +1,16 @@
#include "ParticleEmitter.h"
+#include "api/Sprite.h"
using namespace crepe;
using namespace std;
-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();
}
}
@@ -20,6 +23,6 @@ void ParticleEmitter::restore(const Component & snapshot) {
}
ParticleEmitter & ParticleEmitter::operator=(const ParticleEmitter & other) {
- data.particles = other.data.particles;
+ this->particles = other.particles;
return *this;
}