mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
upgrade emitters garbage collection
This commit is contained in:
parent
78761a445a
commit
52494a680c
3 changed files with 21 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue