Genesis.Event (genesis v0.7.0)

View Source

A struct representing an event that can be dispatched to objects.

Events are the primary mechanism for triggering behavior in Genesis. When an event is sent to an object, it will be processed by the aspects attached that have been registered to handle that specific event.

Fields

  • :name - The unique event identifier
  • :object - The target object this event was sent to
  • :world - The world where of the object was spawned in
  • :from - The caller that sent the event to the object
  • :timestamp - The event creation timestamp
  • :args - Additional event-specific data
  • :handlers - The list of modules that will handle the event

Summary

Functions

Processes a list of events by invoking their respective handlers in order. Each handler can choose to continue processing the event or halt further processing.

Functions

process(event)

Processes a list of events by invoking their respective handlers in order. Each handler can choose to continue processing the event or halt further processing.

NOTE: This function is mostly used internally to process object events and calling it directly should be avoided unless there's a specific need to bypass the default event dispatching mechanism.