amethyst / amethyst/specs

More in-depth explanations of component removal and adding

Aberta
#512 7 comentários 6 reações 0 responsáveis Ver no GitHub
docs
Linguagem predominante
Rust
Estrelas
2.6k
Forks
215
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

The information available in the book on component adding and removal (specifically within the `run()` function of a `System`) is quite brief. The only example completely avoids deletions which, at least for `LazyUpdate`, have a drastically different syntax from insertions.

Also, I would appreciate examples on how to do insertions and _especially_ deletions inside a `join()` loop. Insertions aren't that problematic because you usually aren't `join()`-ing over the component you're inserting into. But for deletion this is different.

I think that section would be much better if it addressed these issues. For instance, by giving an example using `drain()`, and a canonical example of non-lazily deleting entities from some component inside a loop without `drain()` (because maybe you don't want to remove _all_ of them).

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.