diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 22:04:49 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 22:04:49 +0100 |
commit | d3a04fb1e8b119017375caab74c43674006a7348 (patch) | |
tree | 6fe8f16275318245c6cdcb925825587fbf076910 /src/crepe/system/ParticleSystem.cpp | |
parent | 927aab8cf424d1f3bf25056ce4b4126ce9f4edab (diff) |
broken particle test
Diffstat (limited to 'src/crepe/system/ParticleSystem.cpp')
-rw-r--r-- | src/crepe/system/ParticleSystem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index 85b8248..a56de60 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -34,7 +34,7 @@ void ParticleSystem::update() { } // Update all particles - for (Particle & particle : emitter.data.particles) { + for (Particle & particle : emitter.particles) { if (particle.active) { particle.update(dt); } @@ -57,7 +57,7 @@ void ParticleSystem::emit_particle(ParticleEmitter & emitter, const Transform & vec2 velocity = {random_speed * std::cos(angle_radians), random_speed * std::sin(angle_radians)}; - for (Particle & particle : emitter.data.particles) { + for (Particle & particle : emitter.particles) { if (!particle.active) { particle.reset(emitter.data.end_lifespan, initial_position, velocity, random_angle); @@ -76,7 +76,7 @@ void ParticleSystem::check_bounds(ParticleEmitter & emitter, const Transform & t const float TOP = offset.y - half_height; const float BOTTOM = offset.y + half_height; - for (Particle & particle : emitter.data.particles) { + for (Particle & particle : emitter.particles) { const vec2 & position = particle.position; bool within_bounds = (position.x >= LEFT && position.x <= RIGHT && position.y >= TOP && position.y <= BOTTOM); |