Struct tinyecs::Entity [] [src]

pub struct Entity {
    pub id: i32,
    pub components: RefCell<HashMap<TypeId, Box<Any>>>,
    pub fresh: RefCell<bool>,
}

Fields

Methods

impl Entity
[src]

Mark this entity as not refreshed. On beginning of next frame new registered components will affect their systems.

Remove component of given type from entity Be carefull, if this component is borrowed at this moment, it will not be really deleted.

Move component from entity to CompoentGuard. In general case, it behaves like &mut T. While component is borrowed, second get_component() with same type will cause panic