mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-04 05:13:55 -04:00
Small fixes
This commit is contained in:
parent
f7a394f057
commit
6ddb28ffbc
10 changed files with 85 additions and 71 deletions
|
@ -10,8 +10,6 @@ function Assemblage.new(assemble)
|
|||
__isAssemblage = true,
|
||||
}, Assemblage)
|
||||
|
||||
Assemblage.__mt = {__index = assemblage}
|
||||
|
||||
return assemblage
|
||||
end
|
||||
|
||||
|
@ -22,5 +20,7 @@ function Assemblage:assemble(e, ...)
|
|||
end
|
||||
|
||||
return setmetatable(Assemblage, {
|
||||
__call = function(_, ...) return Assemblage.new(...) end,
|
||||
__call = function(_, ...)
|
||||
return Assemblage.new(...)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -33,5 +33,7 @@ function Component:__initialize(...)
|
|||
end
|
||||
|
||||
return setmetatable(Component, {
|
||||
__call = function(_, ...) return Component.new(...) end,
|
||||
__call = function(_, ...)
|
||||
return Component.new(...)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -136,5 +136,7 @@ function Entity:has(component)
|
|||
end
|
||||
|
||||
return setmetatable(Entity, {
|
||||
__call = function(_, ...) return Entity.new(...) end,
|
||||
__call = function(_, ...)
|
||||
return Entity.new(...)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -61,11 +61,13 @@ function Concord.init(settings)
|
|||
error("bad argument #1 to 'Concord.addInstance' (Instance expected, got "..type(instance)..")", 2)
|
||||
end
|
||||
|
||||
for i, instance in ipairs(Concord.instances) do
|
||||
for i, _instance in ipairs(Concord.instances) do
|
||||
if (instance == _instance) then
|
||||
table.remove(Concord.instances, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
love.run = require(PATH..".run")
|
||||
end
|
||||
|
|
|
@ -282,5 +282,7 @@ function Instance:onEntityRemoved(e) -- luacheck: ignore
|
|||
end
|
||||
|
||||
return setmetatable(Instance, {
|
||||
__call = function(_, ...) return Instance.new(...) end,
|
||||
__call = function(_, ...)
|
||||
return Instance.new(...)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -77,5 +77,7 @@ function List:has(obj)
|
|||
end
|
||||
|
||||
return setmetatable(List, {
|
||||
__call = function() return List.new() end,
|
||||
__call = function()
|
||||
return List.new()
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -46,5 +46,7 @@ end
|
|||
|
||||
return setmetatable(Pool, {
|
||||
__index = List,
|
||||
__call = function(_, ...) return Pool.new(...) end,
|
||||
__call = function(_, ...)
|
||||
return Pool.new(...)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -156,5 +156,7 @@ function System:disabledCallback(callbackName) -- luacheck: ignore
|
|||
end
|
||||
|
||||
return setmetatable(System, {
|
||||
__call = function(_, ...) return System.new(...) end,
|
||||
__call = function(_, ...)
|
||||
return System.new(...)
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue