module Entitas::Events

Defined in:

entitas/events.cr
entitas/macros/events.cr

Macro Summary

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

[View source]