pub fn remove(&mut self, entity_id: u32) -> bool {
        let id = entity_id as usize;
        let is_present = id < self.total_slot_count && !self.free_slots.insert(id);

        if is_present {
            for (_, (type_info, data)) in &mut self.components {
                if type_info.needs_drop {
                    unsafe {
                        let ptr = data.as_mut_ptr().add(id * type_info.size);
                        (type_info.drop_func)(ptr);
                    }
                }
            }
        }

        is_present
    }
/// Removes an entity from the archetype. Returns `true` if the entity was present in the archetype.
Removes an entity from the archetype. Returns `true` if the entity was present in the archetype.
Removes an entity from the archetype . Returns ` true ` if the entity was present in the archetype .
pub fn remove(&mut self, entity_id: u32) -> bool {
        let id = entity_id as usize;
        let is_present = id < self.total_slot_count && !self.free_slots.insert(id);
        if is_present {
            for (_, (type_info, data)) in &mut self.components {
                if type_info.needs_drop {
                    unsafe {
                        let ptr = data.as_mut_ptr().add(id * type_info.size);
                        (type_info.drop_func)(ptr);
                    }
                }
            }
        }
        is_present
    }
pub fn remove ( & mut self , entity_id : u32 ) -> bool { let id = entity_id as usize ; let is_present = id < self . total_slot_count && ! self . free_slots . insert ( id ) ; if is_present { for ( _ , ( type_info , data ) ) in & mut self . components { if type_info . needs_drop { unsafe { let ptr = data . as_mut_ptr ( ) . add ( id * type_info . size ) ; ( type_info . drop_func ) ( ptr ) ; } } } } is_present }
Removes an entity from the archetype.
Removes an entity from the archetype .
&mut self
entity_id
u32
&mut self
entity_id
u32