mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add 'frames' particles setting
This commit is contained in:
parent
39893ee940
commit
b9b122dc83
6 changed files with 48 additions and 1 deletions
|
|
@ -58,6 +58,9 @@ void Emitter::update(
|
|||
} else if (auto entityId = std::get_if<entityid_t>(&origin)) {
|
||||
if (auto entity = level.entities->get(*entityId)) {
|
||||
position = entity->getTransform().pos;
|
||||
} else {
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
}
|
||||
const float maxDistance = preset.maxDistance;
|
||||
|
|
@ -102,6 +105,10 @@ void Emitter::update(
|
|||
}
|
||||
}
|
||||
|
||||
void Emitter::stop() {
|
||||
count = 0;
|
||||
}
|
||||
|
||||
bool Emitter::isDead() const {
|
||||
return count == 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue