Tainted \\ Coders

Run a system conditionally

Last updated:

Use run conditions when adding the system.

fn main() {
            // The common_conditions module has a few useful run conditions
            // for checking resources and states. These are included in the prelude.
            // This is a custom run condition, defined using a system that returns
            // a `bool` and which has read-only `SystemParam`s.
            // Both run conditions must return `true` in order for the system to run.
            // Note that this second run condition will be evaluated even if the first returns `false`.