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

Rename query.entity() and query.get() #752

Merged
merged 1 commit into from
Oct 31, 2020
Merged

Conversation

cart
Copy link
Member

@cart cart commented Oct 30, 2020

query.get::<Component>(entity) is now query.get_component::<Component>(entity)

and

query.entity(entity) is now query.get(entity)

This terminology is both clearer and gives the preferred action (getting the full query) precedence. This should be preferred because individual component lookup is slightly more expensive (due to additional safety checks). However for larger queries its probably still cheaper to do an individual component lookup if all you care about is a single component.

@cart cart merged commit ad940fb into bevyengine:master Oct 31, 2020
@karroffel karroffel added the A-ECS Entities, components, systems, and events label Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants