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

Add support iterating across all entities #102

Merged
merged 4 commits into from
Mar 5, 2020

Conversation

aclysma
Copy link
Contributor

@aclysma aclysma commented Feb 17, 2020

This is implemented by iterating component storage to find live entities. I'm using this for comparing two worlds and detecting what has been added between the two worlds.

The function enumerate_entities already existed. I considered renaming it to enumerate_entity_locations but that seemed a bit long. Also, I see more usages of iter_* than enumerate_* in standard library, so maybe it's a tiny bit more idiomatic, maybe?

I don't have a strong opinion about the naming though. Happy to change it to whatever you prefer!

 - rename enumerate_entities to iter_entity_locations
 - add iter_entities, returning an iterator of just entities
legion_core/src/storage.rs Outdated Show resolved Hide resolved
@TomGillen TomGillen merged commit 12d1c9d into amethyst:master Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants