mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-01 20:03:55 -04:00
Fixed removal
This commit is contained in:
parent
7053d91c80
commit
eeadfc8817
3 changed files with 41 additions and 9 deletions
11
main.lua
11
main.lua
|
@ -89,10 +89,21 @@ function RandomRemover:update(dt)
|
|||
love.window.setTitle(love.timer.getFPS())
|
||||
end
|
||||
|
||||
local RemovalSystem = System({})
|
||||
function RemovalSystem:init(instance)
|
||||
self.instance = instance
|
||||
end
|
||||
|
||||
function RemovalSystem:update()
|
||||
self.instance:flush()
|
||||
end
|
||||
|
||||
Game:addSystem(RandomRemover(), "update")
|
||||
Game:addSystem(RectangleRenderer(), "draw")
|
||||
Game:addSystem(CircleRenderer(), "draw")
|
||||
|
||||
Game:addSystem(RemovalSystem(Game), "update", false)
|
||||
|
||||
for i = 1, 100 do
|
||||
local e = Entity()
|
||||
e:give(Position, love.math.random(0, 700), love.math.random(0, 700))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue