mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
Change to using add_run_criteria (#1282)
This commit is contained in:
parent
0a39c81be6
commit
6bd5ec8404
1 changed files with 8 additions and 0 deletions
|
@ -65,6 +65,14 @@ impl SystemStage {
|
|||
}
|
||||
|
||||
pub fn with_run_criteria<S: System<In = (), Out = ShouldRun>>(mut self, system: S) -> Self {
|
||||
self.add_run_criteria(system);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn add_run_criteria<S: System<In = (), Out = ShouldRun>>(
|
||||
&mut self,
|
||||
system: S,
|
||||
) -> &mut Self {
|
||||
self.run_criteria = Some(Box::new(system));
|
||||
self.run_criteria_initialized = false;
|
||||
self
|
||||
|
|
Loading…
Reference in a new issue