mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Add AppBuilder::add_startup_stage_[before/after] (#505)
Co-authored-by: Boiethios <felix-dev@daudre-vignier.fr>
This commit is contained in:
parent
70ad6671db
commit
d4c8436457
1 changed files with 22 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue