diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-17 14:06:02 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-17 14:06:02 +0100 |
commit | c00c83ee9982a7decda341ace95303f131d1b5c0 (patch) | |
tree | 097a81e7d5a7857e22e737a27de5481fd0e6c260 /src/crepe/api/ParticleEmitter.cpp | |
parent | cc2ec343367ebaa3b6a6142532f7a067c3c981a1 (diff) | |
parent | 20d19e3c714d3e8ca3e35c170c07c563ecc719bb (diff) |
Merge branch 'jaro/particle-system-improvement' of github.com:lonkaars/crepe
Diffstat (limited to 'src/crepe/api/ParticleEmitter.cpp')
-rw-r--r-- | src/crepe/api/ParticleEmitter.cpp | 7 |
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(); } } |