aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system
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/system
parent79741613fdf915bfb8b7517826205d2cb1715971 (diff)
make format
Diffstat (limited to 'src/crepe/system')
-rw-r--r--src/crepe/system/ParticleSystem.cpp10
-rw-r--r--src/crepe/system/ParticleSystem.h1
2 files changed, 6 insertions, 5 deletions
diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp
index f98f245..31a4e9e 100644
--- a/src/crepe/system/ParticleSystem.cpp
+++ b/src/crepe/system/ParticleSystem.cpp
@@ -31,8 +31,8 @@ void ParticleSystem::update() {
while (emitter.spawn_accumulator >= 1.0) {
this->emit_particle(emitter, transform);
emitter.spawn_accumulator -= 1.0;
- }
-
+ }
+
// Update all particles
for (Particle & particle : emitter.particles) {
if (particle.active) {
@@ -49,9 +49,11 @@ void ParticleSystem::emit_particle(ParticleEmitter & emitter, const Transform &
constexpr float DEG_TO_RAD = M_PI / 180.0;
vec2 initial_position = emitter.data.position + transform.position;
- float random_angle = this->generate_random_angle(emitter.data.min_angle, emitter.data.max_angle);
+ float random_angle
+ = this->generate_random_angle(emitter.data.min_angle, emitter.data.max_angle);
- float random_speed = this->generate_random_speed(emitter.data.min_speed, emitter.data.max_speed);
+ float random_speed
+ = this->generate_random_speed(emitter.data.min_speed, emitter.data.max_speed);
float angle_radians = random_angle * DEG_TO_RAD;
vec2 velocity
diff --git a/src/crepe/system/ParticleSystem.h b/src/crepe/system/ParticleSystem.h
index 95a2bd5..154521d 100644
--- a/src/crepe/system/ParticleSystem.h
+++ b/src/crepe/system/ParticleSystem.h
@@ -23,7 +23,6 @@ public:
void update() override;
private:
-
/**
* \brief Emits a particle from the specified emitter based on its emission properties.
*