tick method
Advances deadlines and queues expired removals.
Implementation
void tick(double dt) {
var i = 0;
while (i < _length) {
final remaining = _deadlines[i] - dt;
if (remaining > 0) {
_deadlines[i] = remaining;
i++;
continue;
}
final index = _indices[i];
final generation = _generations[i];
final type = _types[i]!;
// Swap-remove first; the row swapped in from the end has not been
// ticked yet this pass, so continuing at [i] ticks it next.
_removeRow(i);
final entity = world.entities.resolve(index);
if (entity.generation != generation) continue;
if (!world.stores.isRegistered(type) ||
!world.stores.require(type).containsIndex(index)) {
continue;
}
world.commands.removeByType(type, entity);
}
}