Skip to content

Commit

Permalink
Add AppBuilder::add_startup_stage_[before/after] (#505)
Browse files Browse the repository at this point in the history
Co-authored-by: Boiethios <[email protected]>
  • Loading branch information
Boiethios and Boiethios authored Sep 18, 2020
1 parent 70ad667 commit d4c8436
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions crates/bevy_app/src/app_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,28 @@ impl AppBuilder {
self
}

pub fn add_startup_stage_after(
&mut self,
target: &'static str,
stage_name: &'static str,
) -> &mut Self {
self.app
.startup_schedule
.add_stage_after(target, stage_name);
self
}

pub fn add_startup_stage_before(
&mut self,
target: &'static str,
stage_name: &'static str,
) -> &mut Self {
self.app
.startup_schedule
.add_stage_before(target, stage_name);
self
}

pub fn add_system(&mut self, system: Box<dyn System>) -> &mut Self {
self.add_system_to_stage(stage::UPDATE, system)
}
Expand Down

0 comments on commit d4c8436

Please sign in to comment.