mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -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
|
-- @return A new Entity
|
||||||
function Entity.new()
|
function Entity.new()
|
||||||
local e = setmetatable({
|
local e = setmetatable({
|
||||||
world = nil,
|
__world = nil,
|
||||||
|
|
||||||
__addedComponents = {},
|
__addedComponents = {},
|
||||||
__removedComponents = {},
|
__removedComponents = {},
|
||||||
|
@ -164,6 +164,10 @@ function Entity:getComponents()
|
||||||
return self.__components
|
return self.__components
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Entity:getWorld()
|
||||||
|
return self.__world
|
||||||
|
end
|
||||||
|
|
||||||
return setmetatable(Entity, {
|
return setmetatable(Entity, {
|
||||||
__call = function(_, ...)
|
__call = function(_, ...)
|
||||||
return Entity.new(...)
|
return Entity.new(...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue