pub unsafe fn trigger_entity_internal(
world: DeferredWorld<'_>,
observers: &CachedObservers,
event: PtrMut<'_>,
trigger: PtrMut<'_>,
target_entity: Entity,
trigger_context: &TriggerContext,
)Expand description
Trigger observers watching for the given entity event.
The target_entity should match the EntityEvent::event_target on event for logical correctness.
§Safety
observersmust come from theworldDeferredWorld, and correspond to observers that match theeventtypeeventmust point to anEventtriggermust correspond to theEvent::Triggertype expected by theeventtrigger_context’sTriggerContext::event_keymust correspond to theeventtype.- Read, understand, and abide by the
Triggersafety documentation