module Entitas::Events
Defined in:
entitas/events.crentitas/macros/events.cr
Macro Summary
-
create_event(name, opts)
Will create
Entitas::Eventsstruct for the providedname.
Macro Detail
macro create_event(name, opts)
#
Will create Entitas::Events struct for the provided name. opts defines the struct variables.
create_event OnEntityCreated, {context: Context, entity: Entity}
This will create the code:
struct Entitas::Events::{{name.id}}
getter context : Context
getter entity : Entity
def initialize(context : Context, entity : Entity)
end
end