mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Fix name function
This commit is contained in:
parent
cf0683cf03
commit
659b858f5a
1 changed files with 3 additions and 1 deletions
|
@ -31,7 +31,9 @@ local Name = world:component()
|
||||||
local function parent(entity)
|
local function parent(entity)
|
||||||
return world:target(entity, ChildOf)
|
return world:target(entity, ChildOf)
|
||||||
end
|
end
|
||||||
local function name()
|
local function name(entity)
|
||||||
|
return world:get(entity, Name)
|
||||||
|
end
|
||||||
|
|
||||||
local alice = world:entity()
|
local alice = world:entity()
|
||||||
world:set(alice, Name, "alice")
|
world:set(alice, Name, "alice")
|
||||||
|
|
Loading…
Reference in a new issue