Skip to main content

IntoEntityObserver

Trait IntoEntityObserver 

Source
pub trait IntoEntityObserver<Marker>: Send + 'static {
    // Required method
    fn into_observer_for_entity(self, entity: Entity) -> Observer;
}
Expand description

Trait for types that can be converted into an entity-targeting Observer.

This trait enforces that the event type implements EntityEvent.

Required Methods§

Source

fn into_observer_for_entity(self, entity: Entity) -> Observer

Converts this type into an Observer that watches the given entity.

Implementors§

Source§

impl<E, B, M, T> IntoEntityObserver<(E, B, M)> for T
where E: EntityEvent, B: Bundle, T: IntoObserverSystem<E, B, M>,