Skip to content
ConcordConcordConcord

World:emit

Emits a callback in the World.

← World

Emits a callback in the World.

Calls all functions with the functionName of added Systems (see System class for listener registration). Prefix the name with a System’s name to target one System: "SystemName.event". Automatically flushes before forwarding the event, unless this emit is nested or a flush is already in progress. If beforeEmit exists and returns a truthy value, listeners are skipped. afterEmit is called after listeners when present.

world = world:emit( functionName, ... )
Name Type Description
functionName string Event name, or "SystemName.event" to call only that System
... any Parameters passed to System’s functions
Name Type Description
world World