add 'frames' particles setting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user