Question: Lifetime for components
オープン
- 主要言語
- Rust
- スター
- 2.6k
- フォーク
- 215
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I use a "lifetime" component to handle entity's removing. This is pretty easy, as I can iterate all entities with "Lifetime" component and check if lifetime is still valid, otherwise delete entity.
I want to have the same for components. Some components should only live for "x" seconds.
Do you have any idea how to implement this?
I first thought of a lazy_exec with time delay (just removing comp from entity). The solution should be similar to lazy Update, some "Read" resource which can be written in parallel.
I do not want to iterate over all components.
I do not want a lifetime field in every component.
Thanks
コントリビューションガイド
評価
この issue はまだ評価されていません。