Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Entities iterable #52

Closed
leudz opened this issue Feb 9, 2020 · 2 comments
Closed

Make Entities iterable #52

leudz opened this issue Feb 9, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@leudz
Copy link
Owner

leudz commented Feb 9, 2020

To make it possible the first entity added in the removed linked list must have its index changed to any value (usize::MAX for example).
We can then use the fact that if entities[index].index() == index this entity is alive.

@leudz leudz mentioned this issue Feb 9, 2020
@leudz leudz added the enhancement New feature or request label Feb 9, 2020
@djahandarie
Copy link

I found myself wanting this when trying to build a generalized viewer of my entire World for debugging/development purposes. (Just ended up manually iterating over all the different entities types available.)

@leudz
Copy link
Owner Author

leudz commented Apr 30, 2020

I don't know any better workaround but that's pretty horrible 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants