Skip to main content

dispatch_drops_to_script

Function dispatch_drops_to_script 

Source
pub fn dispatch_drops_to_script<H: ScriptHost + Resource<Mutability = Mutable>>(
    host: ResMut<'_, H>,
    events: MessageReader<'_, '_, DropAccepted>,
    ids: Query<'_, '_, &LumenId>,
    out: MessageWriter<'_, ScriptCommandEvent>,
)
Expand description

Forward each DropAccepted to the script as on_drop(target_id, payload). A reactive on_drop that reassigns a signal drives the next reconcile - no per-frame polling.