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

Is there a way to sort? #147

Closed
neverender opened this issue Jun 25, 2016 · 1 comment
Closed

Is there a way to sort? #147

neverender opened this issue Jun 25, 2016 · 1 comment

Comments

@neverender
Copy link

I would like to use entityx to render stuff. To render efficiently, I need to be able to sort what I get from entities_with_components. For instance: sort by texture_component->filename. Is this possible?

@alecthomas
Copy link
Owner

I assume you mean "can EntityX maintain components in sorted order", and the answer is no it can not. Your best bet is to sort the iterator returned by entities_with_components().

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

No branches or pull requests

2 participants