upgrade emitters garbage collection

This commit is contained in:
MihailRis
2024-12-23 17:26:22 +03:00
parent 78761a445a
commit 52494a680c
3 changed files with 21 additions and 12 deletions
+6
View File
@@ -54,6 +54,9 @@ class Emitter {
util::PseudoRandom random;
public:
/// @brief Number of references (alive particles)
int refCount = 0;
/// @brief Particle settings
ParticlesPreset preset;
Emitter(
@@ -86,6 +89,9 @@ public:
/// @return true if the emitter has spawned all particles
bool isDead() const;
/// @return true if there is at least one alive referring particle left
bool isReferred() const;
const EmitterOrigin& getOrigin() const;
void setOrigin(const EmitterOrigin& origin);