aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-13 20:44:32 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-13 20:44:32 +0100
commit512aa7f54b88994d3095971b2001930b4e612947 (patch)
tree443188c36fcb380b335504ac01b7730bca70266b /src/crepe/api
parent79741613fdf915bfb8b7517826205d2cb1715971 (diff)
make format
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/ParticleEmitter.cpp6
-rw-r--r--src/crepe/api/ParticleEmitter.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp
index 1e9cfaa..4f54bbd 100644
--- a/src/crepe/api/ParticleEmitter.cpp
+++ b/src/crepe/api/ParticleEmitter.cpp
@@ -3,9 +3,11 @@
using namespace crepe;
-ParticleEmitter::ParticleEmitter(game_object_id_t game_object_id, const Sprite & sprite, 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) {
+ sprite(sprite),
+ data(data) {
for (size_t i = 0; i < this->data.max_particles; i++) {
this->particles.emplace_back();
}
diff --git a/src/crepe/api/ParticleEmitter.h b/src/crepe/api/ParticleEmitter.h
index 5b8e8e3..be970f5 100644
--- a/src/crepe/api/ParticleEmitter.h
+++ b/src/crepe/api/ParticleEmitter.h
@@ -78,18 +78,19 @@ public:
* \param game_object_id Identifier for the game object using this emitter.
* \param data Configuration data defining particle properties.
*/
- ParticleEmitter(game_object_id_t game_object_id, const Sprite & sprite,const Data & data);
+ ParticleEmitter(game_object_id_t game_object_id, const Sprite & sprite, const Data & data);
public:
//! Configuration data for particle emission settings.
Data data;
+
private:
//! Only ParticleSystem can move and read particles
friend ParticleSystem;
//! Only RenderSystem can read particles
friend RenderSystem;
//! Saves time left over from last update event.
- float spawn_accumulator = 0;
+ float spawn_accumulator = 0;
//! collection of particles
std::vector<Particle> particles;
};