mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
Reverted a small whoopsie with Entity removal
This commit is contained in:
parent
63d8c39b31
commit
4b8b6a6f88
1 changed files with 16 additions and 0 deletions
|
@ -89,6 +89,22 @@ function System:__check(e)
|
|||
end
|
||||
end
|
||||
|
||||
--- Removed an Entity from the System.
|
||||
-- @param e The Entity to remove
|
||||
function System:__remove(e)
|
||||
if self:__has(e) then
|
||||
for _, pool in ipairs(self.__pools) do
|
||||
if pool:has(e) then
|
||||
pool:remove(e)
|
||||
self:entityRemovedFrom(e, pool)
|
||||
end
|
||||
end
|
||||
|
||||
self.__all[e] = nil
|
||||
self:entityRemoved(e)
|
||||
end
|
||||
end
|
||||
|
||||
--- Tries to add an Entity to the System.
|
||||
-- @param e The Entity to add
|
||||
function System:__tryAdd(e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue