World:emit
Emits a callback in the 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, ... )Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
functionName |
string | Event name, or "SystemName.event" to call only that System |
... |
any | Parameters passed to System’s functions |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
world |
World |