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

Consider adding drain method to TileStorage #579

Closed
rparrett opened this issue Dec 6, 2024 · 1 comment · Fixed by #586
Closed

Consider adding drain method to TileStorage #579

rparrett opened this issue Dec 6, 2024 · 1 comment · Fixed by #586

Comments

@rparrett
Copy link
Collaborator

rparrett commented Dec 6, 2024

I'd like to be able to easily despawn all the tiles in a tilemap without putting them in a Bevy hierarchy.

Also, it would be nice if remove returned the removed entity, if there was one.

@ChristopherBiscardi
Copy link
Collaborator

feels like drain makes sense. Have to set all drained items to None and probably only return the Entitys. So probably a bunch of removes with the change would do it simply enough.

we can easily return the entity from remove. it's already a take, so we just remove the semicolon and add the return value.

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 a pull request may close this issue.

2 participants