mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add entities.name(...) and entity:get_name(...)
This commit is contained in:
parent
ec4043bc12
commit
5a3f28f2b5
6 changed files with 22 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ local Entity = {__index={
|
|||
get_component=function(self, name) return self.components[name] end,
|
||||
has_component=function(self, name) return self.components[name] ~= nil end,
|
||||
get_uid=function(self) return self.eid end,
|
||||
get_name=function(self) return entities.name(self.eid) end,
|
||||
}}
|
||||
|
||||
local entities = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue