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

Change detection common conditions #7670

Closed
wants to merge 3 commits into from
Closed

Change detection common conditions #7670

wants to merge 3 commits into from

Conversation

LiamGallagher737
Copy link
Member

Objective

Add some new run condition generators to the common_conditions module for checking the change detection of a certain resource or state.


Changelog

Added

  • resource_added<T: Resource>
  • resource_changed<T: Resource>
  • resource_exsits_and_changed<T: Resource>
  • resource_added<T: Resource>
  • state_changed<T: States>

I have not added the rest of the methods for states because as far as I can tell you can't add them at run time, please let me know if I am wrong and I will add them too.

Another note, the fact that state_change will trigger even when the state was set to the same variant it already had makes me hesitant on whether to keep it as it could be a bit misleading, some opinions on this would be great.

@alice-i-cecile
Copy link
Member

Some of these are being added in #7579; we should be careful to avoid duplication.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Feb 14, 2023
@LiamGallagher737
Copy link
Member Author

🤦‍♂️ should have looked before I started, that PR has all of them, I shall now close this.

@LiamGallagher737 LiamGallagher737 deleted the Change-Detection-Common-Conditions branch February 15, 2023 04:06
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 C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants