add entities.name(...) and entity:get_name(...)

This commit is contained in:
MihailRis
2024-07-17 20:15:45 +03:00
parent ec4043bc12
commit 5a3f28f2b5
6 changed files with 22 additions and 0 deletions
+1
View File
@@ -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 = {}