mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
add version of the ecs's write_world
method that takes a pre-boxed world writer (#661)
Co-authored-by: Nathan Jeffords <njeffords@comtechefdata.com>
This commit is contained in:
parent
df64e1fc92
commit
7e23e132ef
1 changed files with 10 additions and 2 deletions
|
@ -219,8 +219,11 @@ impl CommandsInternal {
|
|||
}
|
||||
|
||||
pub fn write_world<W: WorldWriter + 'static>(&mut self, world_writer: W) -> &mut Self {
|
||||
self.commands
|
||||
.push(Command::WriteWorld(Box::new(world_writer)));
|
||||
self.write_world_boxed(Box::new(world_writer))
|
||||
}
|
||||
|
||||
pub fn write_world_boxed(&mut self, world_writer: Box<dyn WorldWriter + 'static>) -> &mut Self {
|
||||
self.commands.push(Command::WriteWorld(world_writer));
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -313,6 +316,11 @@ impl Commands {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn write_world_boxed(&mut self, world_writer: Box<dyn WorldWriter + 'static>) -> &mut Self {
|
||||
self.commands.lock().write_world_boxed(world_writer);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn write_resources<W: ResourcesWriter + 'static>(
|
||||
&mut self,
|
||||
resources_writer: W,
|
||||
|
|
Loading…
Reference in a new issue