Possibility of a World::retain() method?
- Lenguaje dominante
- Rust
- Estrellas
- 41
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi, first off, just want to say I love this library, it's absolutely fantastic and exactly what I've been looking for. Also the documentation is amazing, so thank you so much for putting the effort in there.
I think a retain(..) interface would be incredibly handy to have, I find myself writing the following boilerplate quite a lot and there are definitely optimisations that could be made under the hood:
```rust
let mut entities_to_remove = vec![];
for result!(identifier, data) in world.query(query).iter {
if data.health < 0.0 {
entities_to_remove.push(identifier);
}
}
for identifier in entities_to_remove {
world.remove(identifier);
}
```
Also, do you take pull requests? I might take a shot at implementing the above myself if you think it wouldn't be too difficult of a change to make.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.