Cache added and removed components

This commit is contained in:
Tjakka5 2019-12-22 21:00:53 +01:00
parent bb508ee947
commit ecb3c2db7e
4 changed files with 67 additions and 18 deletions

View file

@ -38,7 +38,10 @@ end
-- @return A new initialized Bag
function Component:__initialize(...)
if self.__populate then
local bag = setmetatable({}, self)
local bag = setmetatable({
__baseComponent = self,
}, self)
self.__populate(bag, ...)
return bag