Struct yaecs::Entity
[−]
[src]
pub struct Entity { pub label: String, pub component_mask: u64, pub components: AnyMap, }
An Entity
is simply an identifier for a bag of components. In general, System
s operate on
a subset of all entities that posess components the System
is interested in.
Fields
label: String
A user-defined label for this entity. This could be thrown out if in future we run into memory issues, but for now its convenient as it allows us to more easily identify an entity.
component_mask: u64
Bitmask, indicating which components are implemented for this type.
components: AnyMap
Bag of components
Methods
impl Entity
[src]
fn new(label: &'static str) -> Entity
Creates a new Entity
with an empty bag of components