mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-01 20:03:55 -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
4
main.lua
4
main.lua
|
@ -76,13 +76,13 @@ end
|
|||
function RandomRemover:update(dt)
|
||||
self.time = self.time + dt
|
||||
|
||||
if self.time >= 0.5 then
|
||||
if self.time >= 0.25 then
|
||||
self.time = 0
|
||||
|
||||
if self.pool.size > 0 then
|
||||
local i = love.math.random(1, self.pool.size)
|
||||
|
||||
Game:removeEntity(self.pool.objects[i])
|
||||
self.pool:get(i):destroy()
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue