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

Add AppBuilder::add_startup_stage_[before/after] #505

Merged
merged 1 commit into from
Sep 18, 2020
Merged
Changes from all commits
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
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