Trait ark_api::world::ComponentTrait
source · [−]pub trait ComponentTrait: Debug {
fn get_type() -> ComponentType;
fn from_entity(handle: Entity) -> Self;
fn entity(&self) -> Entity;
}
Expand description
Common interface that components expose.
Required Methods
sourcefn get_type() -> ComponentType
fn get_type() -> ComponentType
The type of the component, as a ComponentType
enum.
sourcefn from_entity(handle: Entity) -> Self
fn from_entity(handle: Entity) -> Self
Adopt an Entity
, wrap in a component struct.