Event:entity

Returns the Entity that emitted this event.

Usage

event:entity()

Returns

Name Type Description
entity Entity Entity that emitted this event.

Examples

local ecs = crystal.ECS:new();
local entity = ecs:spawn(crystal.Entity);
local event = entity:create_event(crystal.Event);
assert(event:entity() == entity);

This site uses Just the Docs, a documentation theme for Jekyll.