diff options
Diffstat (limited to 'src/crepe/system/ParticleSystem.h')
-rw-r--r-- | src/crepe/system/ParticleSystem.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/crepe/system/ParticleSystem.h b/src/crepe/system/ParticleSystem.h index 3ac1d3f..3b9cb54 100644 --- a/src/crepe/system/ParticleSystem.h +++ b/src/crepe/system/ParticleSystem.h @@ -10,9 +10,15 @@ public: void update(); private: - void emit_particle(ParticleEmitter & emitter); //emits a new particle + void emit_particle(ParticleEmitter & emitter,const Transform& transform); + int calculate_update(int count, double emission); + void check_bounds(ParticleEmitter & emitter,const Transform& transform); - float elapsed_time; //elapsed time since the last emission +private: + //! counter to count updates to determine how many times emit_particle is called. + uint32_t update_count = 0; + //! determines the lowest amount of emissionrate (1000 = 0.001 = 1 particle per 1000 updates). + const uint32_t MAX_UPDATE_COUNT = 100; }; } // namespace crepe |