pub fn remove_component<T: Any>(&mut self, entity: &Entity) -> Option<T> {
        if self.is_valid_entity(entity) {
            let res = self.components[entity.idx].remove::<T>();

            return match res {
                Some(res) => {
                    self.ent_changed.insert(entity.idx, entity.uuid);
                    Some(res)
                },
                None => None,
            }
        }
        None
    }
/// Removes a component from an entity.
/// Returning the component if it existed, or `None` if it didn't.
Removes a component from an entity.
Returning the component if it existed, or `None` if it didn't.
Removes a component from an entity . Returning the component if it existed or ` None ` if it didn ' t .
pub fn remove_component<T: Any>(&mut self, entity: &Entity) -> Option<T> {
        if self.is_valid_entity(entity) {
            let res = self.components[entity.idx].remove::<T>();
            return match res {
                Some(res) => {
                    self.ent_changed.insert(entity.idx, entity.uuid);
                    Some(res)
                },
                None => None,
            }
        }
        None
    }
pub fn remove_component < T : Any > ( & mut self , entity : & Entity ) -> Option < T > { if self . is_valid_entity ( entity ) { let res = self . components [ entity . idx ] . remove :: < T > ( ) ; return match res { Some ( res ) => { self . ent_changed . insert ( entity . idx , entity . uuid ) ; Some ( res ) } , None => None , } } None }
Removes a component from an entity.
Removes a component from an entity .
&mut self
entity
&Entity
&mut self
entity
&Entity