diff options
Diffstat (limited to 'engine-ecs/src/extension.rs')
| -rw-r--r-- | engine-ecs/src/extension.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engine-ecs/src/extension.rs b/engine-ecs/src/extension.rs index 9c6614b..1975933 100644 --- a/engine-ecs/src/extension.rs +++ b/engine-ecs/src/extension.rs @@ -46,23 +46,23 @@ impl<'world> Collector<'world> } /// Adds a entity to the [`World`]. - pub fn add_entity<Comps>(&mut self, components: Comps) + pub fn spawn<Comps>(&mut self, components: Comps) where Comps: ComponentSequence, { - self.world.create_entity(components); + self.world.spawn(components); } /// Adds a declared entity to the [`World`]. - pub fn add_declared_entity(&mut self, entity_decl: &EntityDeclaration) + pub fn spawn_declared_entity(&mut self, entity_decl: &EntityDeclaration) { - self.world.create_declared_entity(entity_decl); + self.world.spawn_declared_entity(entity_decl); } - /// Adds a globally shared singleton value to the [`World`]. + /// Adds a singleton component to the [`World`]. /// /// # Errors - /// Returns `Err` if this [`Sole`] has already been added. + /// Returns `Err` if the [`Sole`] already exists. pub fn add_sole<SoleT>(&mut self, sole: SoleT) -> Result<(), SoleAlreadyExistsError> where SoleT: Sole, |
