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

[Merged by Bors] - Add system sets and run criteria example #1909

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/ecs/system_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ fn main() {
App::build()
.add_plugins(DefaultPlugins)
.init_resource::<Done>()
// Note that the system sets added in this example sets their run criteria explicitly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "Note that the system sets added in this example set their run criteria explicitly."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

// See the `ecs/state.rs` example for a pattern where run criteria are set implicitly for common
// use cases- typically state transitions.
// Also note that a system set has a single run criterion at most, which means using `.with_run_criteria(...)`
// after `SystemSet::on_update(...)` would override the state transition criterion.
.add_system_set(
SystemSet::new()
// This label is added to all systems in this set.
Expand Down