pub fn create_entities(&mut self) -> Vec<EntityId> {
        let mut new_entities = Vec::new();
        while !self.entities_to_create.is_empty() {
            let prefab = self.entities_to_create.pop_front().unwrap();
            new_entities.push(self.create_entity(&prefab));
        }

        new_entities
    }
// Must be called by system manager only so it can add the new entities to their corresponding systems. TODO: Figure out a better way
Must be called by system manager only so it can add the new entities to their corresponding systems. TODO: Figure out a better way
Must be called by system manager only so it can add the new entities to their corresponding systems . TODO : Figure out a better way
pub fn create_entities(&mut self) -> Vec<EntityId> {
        let mut new_entities = Vec::new();
        while !self.entities_to_create.is_empty() {
            let prefab = self.entities_to_create.pop_front().unwrap();
            new_entities.push(self.create_entity(&prefab));
        }
        new_entities
    }
pub fn create_entities ( & mut self ) -> Vec < EntityId > { let mut new_entities = Vec :: new ( ) ; while ! self . entities_to_create . is_empty ( ) { let prefab = self . entities_to_create . pop_front ( ) . unwrap ( ) ; new_entities . push ( self . create_entity ( & prefab ) ) ; } new_entities }
Must be called by system manager only so it can add the new entities to their corresponding systems.
Must be called by system manager only so it can add the new entities to their corresponding systems .
&mut self