mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 04:13:58 -04:00
Add entity:getWorld
This commit is contained in:
parent
89443bd961
commit
f6536d5a0e
1 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,7 @@ Entity.__index = Entity
|
|||
-- @return A new Entity
|
||||
function Entity.new()
|
||||
local e = setmetatable({
|
||||
world = nil,
|
||||
__world = nil,
|
||||
|
||||
__addedComponents = {},
|
||||
__removedComponents = {},
|
||||
|
@ -164,6 +164,10 @@ function Entity:getComponents()
|
|||
return self.__components
|
||||
end
|
||||
|
||||
function Entity:getWorld()
|
||||
return self.__world
|
||||
end
|
||||
|
||||
return setmetatable(Entity, {
|
||||
__call = function(_, ...)
|
||||
return Entity.new(...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue