add 'frames' particles setting

This commit is contained in:
MihailRis
2024-11-03 19:18:26 +03:00
parent 39893ee940
commit b9b122dc83
6 changed files with 48 additions and 1 deletions
+7
View File
@@ -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;
}