pub fn destroy_entities(&mut self) -> Vec<EntityId> {
        let mut destroyed_entities = Vec::new();
        while !self.entities_to_destroy.is_empty() {
            let entity = self.entities_to_destroy.pop_front().unwrap();
            self.destroy_entity(&entity);
            destroyed_entities.push(entity);
        } 

        destroyed_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 destroy_entities(&mut self) -> Vec<EntityId> {
        let mut destroyed_entities = Vec::new();
        while !self.entities_to_destroy.is_empty() {
            let entity = self.entities_to_destroy.pop_front().unwrap();
            self.destroy_entity(&entity);
            destroyed_entities.push(entity);
        } 
        destroyed_entities
    }
pub fn destroy_entities ( & mut self ) -> Vec < EntityId > { let mut destroyed_entities = Vec :: new ( ) ; while ! self . entities_to_destroy . is_empty ( ) { let entity = self . entities_to_destroy . pop_front ( ) . unwrap ( ) ; self . destroy_entity ( & entity ) ; destroyed_entities . push ( entity ) ; } destroyed_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