Expand description
Components are bits of data and logic that can be added to entities.
Fields
owner: Option<EntityID>
The entity this component is attached to, or None
flags: u32
Implementations
Trait Implementations
sourceimpl AsRef<Component> for FpsDisplay
impl AsRef<Component> for FpsDisplay
sourceimpl AsRef<Component> for MoviePlayer
impl AsRef<Component> for MoviePlayer
sourceimpl AsRef<Component> for SpeedAdjuster
impl AsRef<Component> for SpeedAdjuster
sourceimpl ComponentExt for Component
impl ComponentExt for Component
sourcefn on_removed(&self)
fn on_removed(&self)
Called just before this component has been removed from its entity.
sourcefn on_start(&self)
fn on_start(&self)
Called just before this component’s first update after being added. This is the best place to put initialization logic that requires accessing other components/entities, since it waits until the rest of the entity hierarchy is accessible. Read more
sourcefn on_stop(&self)
fn on_stop(&self)
Called just before this component will be removed from its entity, if on_start was previously called. Read more
sourcefn on_update(&self, dt: f32)
fn on_update(&self, dt: f32)
Called when this component receives a game update. @param dt The time elapsed since the last frame, in seconds. Read more
fn name(&self) -> Option<String>
sourceimpl Disposable for Component
impl Disposable for Component
impl Copy for Component
impl StructuralPartialEq for Component
Auto Trait Implementations
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnwindSafe for Component
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.