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
observers
must come from theworld
DeferredWorld
, and correspond to observers that match theevent
typeevent
must point to anEvent
trigger
must correspond to theEvent::Trigger
type expected by theevent
trigger_context
’sTriggerContext::event_key
must correspond to theevent
type.- Read, understand, and abide by the
Trigger
safety documentation