mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 20:33:54 -04:00
Allowed for entities to be in multiple systems. Fixed the removal issue.
This commit is contained in:
parent
c750ea119f
commit
100d6320c7
5 changed files with 28 additions and 10 deletions
|
@ -19,7 +19,7 @@ function Instance.new()
|
|||
end
|
||||
|
||||
function Instance:addEntity(e)
|
||||
e.instance = self
|
||||
e.instances:add(self)
|
||||
self.entities:add(e)
|
||||
self:checkEntity(e)
|
||||
end
|
||||
|
@ -31,6 +31,7 @@ function Instance:checkEntity(e)
|
|||
end
|
||||
|
||||
function Instance:removeEntity(e)
|
||||
e.instances:remove(self)
|
||||
self.entities:remove(e)
|
||||
|
||||
for _, system in ipairs(self.systems) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue