From fdbe42dd7d5d5ea9a535b8607fce16b7519dde4a Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Sat, 11 Jan 2020 01:51:20 -0800 Subject: [PATCH] app_builder: add world and scheduler setters --- src/app/app_builder.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/app_builder.rs b/src/app/app_builder.rs index 922ac5dcb0..57b80e5443 100644 --- a/src/app/app_builder.rs +++ b/src/app/app_builder.rs @@ -21,6 +21,16 @@ impl AppBuilder { self.app.run(); } + pub fn with_world(mut self, world: World) -> Self { + self.app.world = world; + self + } + + pub fn with_scheduler(mut self, scheduler: SystemScheduler::) -> Self { + self.app.scheduler = scheduler; + self + } + pub fn setup(mut self, setup: &dyn Fn(&mut World, &mut SystemScheduler)) -> Self { setup(&mut self.app.world, &mut self.app.scheduler); self