pub fn confirm_changes(&mut self) {
        // Remove all entities in the `remove` list.
        for (&idx, &uuid) in self.ent_remove.iter() {
            if self.is_valid_entity(&Entity{ idx: idx, uuid: uuid }) {
                self.active[idx] = 0;
                self.reusable_idxs.push(idx);
                // Clear the components associated with the entity.
                self.components[idx].clear();
            }
        }

        // Check if there are any invalid parent links.
        // This could probably be done quicker (that `clone()` doesn't look efficient).
        for (child, parent) in self.parents.clone().iter() {
            if !(self.is_valid_entity(child) && self.is_valid_entity(parent)) {
                self.parents.remove(child);
            }
        }

        self.ent_added.clear();
        self.ent_remove.clear();
        self.ent_changed.clear();
    }
/// Removes all entities currently slated for removal.
/// Also clears the lists of added, removed and changed entities and
/// checks all entries in the `parents` hashmap for validity.
Removes all entities currently slated for removal.
Also clears the lists of added, removed and changed entities and
checks all entries in the `parents` hashmap for validity.
Removes all entities currently slated for removal . Also clears the lists of added removed and changed entities and checks all entries in the ` parents ` hashmap for validity .
pub fn confirm_changes(&mut self) {
        // Remove all entities in the `remove` list.
        for (&idx, &uuid) in self.ent_remove.iter() {
            if self.is_valid_entity(&Entity{ idx: idx, uuid: uuid }) {
                self.active[idx] = 0;
                self.reusable_idxs.push(idx);
                // Clear the components associated with the entity.
                self.components[idx].clear();
            }
        }
        // Check if there are any invalid parent links.
        // This could probably be done quicker (that `clone()` doesn't look efficient).
        for (child, parent) in self.parents.clone().iter() {
            if !(self.is_valid_entity(child) && self.is_valid_entity(parent)) {
                self.parents.remove(child);
            }
        }
        self.ent_added.clear();
        self.ent_remove.clear();
        self.ent_changed.clear();
    }
pub fn confirm_changes ( & mut self ) { // Remove all entities in the `remove` list. for ( & idx , & uuid ) in self . ent_remove . iter ( ) { if self . is_valid_entity ( & Entity { idx : idx , uuid : uuid } ) { self . active [ idx ] = 0 ; self . reusable_idxs . push ( idx ) ; // Clear the components associated with the entity. self . components [ idx ] . clear ( ) ; } } // Check if there are any invalid parent links. // This could probably be done quicker (that `clone()` doesn't look efficient). for ( child , parent ) in self . parents . clone ( ) . iter ( ) { if ! ( self . is_valid_entity ( child ) && self . is_valid_entity ( parent ) ) { self . parents . remove ( child ) ; } } self . ent_added . clear ( ) ; self . ent_remove . clear ( ) ; self . ent_changed . clear ( ) ; }
Removes all entities currently slated for removal.
Removes all entities currently slated for removal .
&mut self
&mut self