Skip to content

Commit

Permalink
Add AppBuilder::add_startup_stage_[before/after] (bevyengine#505)
Browse files Browse the repository at this point in the history
Co-authored-by: Boiethios <[email protected]>
  • Loading branch information
2 people authored and mrk-its committed Oct 6, 2020
1 parent 54cef25 commit 3476c7e
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 3476c7e

Please sign in to comment.