From 1d4b3a44c9ce1e69f4f0e3909998225f8af3fea2 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 13 Nov 2024 19:00:29 +0100 Subject: fixed feedback --- src/crepe/api/ParticleEmitter.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/crepe/api/ParticleEmitter.h') diff --git a/src/crepe/api/ParticleEmitter.h b/src/crepe/api/ParticleEmitter.h index 83a1588..6e29e60 100644 --- a/src/crepe/api/ParticleEmitter.h +++ b/src/crepe/api/ParticleEmitter.h @@ -48,7 +48,7 @@ public: //! position of the emitter Vector2 position; //! maximum number of particles - const uint32_t max_particles = 0; + const unsigned int max_particles = 0; //! rate of particle emission per update (Lowest value = 0.001 any lower is ignored) double emission_rate = 0; //! min speed of the particles @@ -80,8 +80,7 @@ public: * \param game_object_id Identifier for the game object using this emitter. * \param data Configuration data defining particle properties. */ - ParticleEmitter(uint32_t game_object_id, const Data & data); - ~ParticleEmitter(); + ParticleEmitter(game_object_id_t game_object_id, const Data & data); public: //! Configuration data for particle emission settings. -- cgit v1.2.3 From 9a95e6cb2c1f1255643d1b8996cd8eeb108c6f8c Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 13 Nov 2024 19:24:32 +0100 Subject: fixed issues --- src/crepe/api/ParticleEmitter.cpp | 1 - src/crepe/api/ParticleEmitter.h | 9 ++------- src/crepe/system/ParticleSystem.cpp | 2 -- src/crepe/system/ParticleSystem.h | 7 +------ 4 files changed, 3 insertions(+), 16 deletions(-) (limited to 'src/crepe/api/ParticleEmitter.h') diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp index 7032f9e..43d2e69 100644 --- a/src/crepe/api/ParticleEmitter.cpp +++ b/src/crepe/api/ParticleEmitter.cpp @@ -1,5 +1,4 @@ #include "ParticleEmitter.h" -#include "Particle.h" using namespace crepe; diff --git a/src/crepe/api/ParticleEmitter.h b/src/crepe/api/ParticleEmitter.h index 6e29e60..a9e872f 100644 --- a/src/crepe/api/ParticleEmitter.h +++ b/src/crepe/api/ParticleEmitter.h @@ -1,24 +1,21 @@ #pragma once -#include #include #include "Component.h" #include "Particle.h" -#include "Sprite.h" #include "Vector2.h" -// class Sprite; - namespace crepe { +class Sprite; + /** * \brief Data holder for particle emission parameters. * * The ParticleEmitter class stores configuration data for particle properties, * defining the characteristics and boundaries of particle emissions. */ - class ParticleEmitter : public Component { public: /** @@ -75,8 +72,6 @@ public: public: /** - * \brief Constructs a ParticleEmitter data holder with specified settings. - * * \param game_object_id Identifier for the game object using this emitter. * \param data Configuration data defining particle properties. */ diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index 4a25b47..e7a3bec 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -11,8 +11,6 @@ using namespace crepe; -ParticleSystem::ParticleSystem() {} - void ParticleSystem::update() { // Get all emitters ComponentManager & mgr = ComponentManager::get_instance(); diff --git a/src/crepe/system/ParticleSystem.h b/src/crepe/system/ParticleSystem.h index 3a118fb..664394e 100644 --- a/src/crepe/system/ParticleSystem.h +++ b/src/crepe/system/ParticleSystem.h @@ -12,11 +12,6 @@ class Transform; */ class ParticleSystem : public System{ public: - /** - * \brief Default constructor. - */ - ParticleSystem(); - /** * \brief Updates all particle emitters by emitting particles, updating particle states, and checking bounds. */ @@ -68,7 +63,7 @@ private: private: //! Counter to count updates to determine how many times emit_particle is called. - uint32_t update_count = 0; + unsigned int update_count = 0; //! Determines the lowest amount of emission rate (1000 = 0.001 = 1 particle per 1000 updates). static constexpr unsigned int MAX_UPDATE_COUNT = 100; }; -- cgit v1.2.3