Merge pull request #25 from jackamo/fix/quick-readme-fixes

README: Fix 'Quick Example' to be runnable
This commit is contained in:
Justin van der Leij 2020-01-09 10:58:02 +01:00 committed by GitHub
commit be4a5d9ec7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -536,7 +536,7 @@ function MoveSystem:update(dt)
end
local DrawSystem = Concord.System({Position, Drawable})
local DrawSystem = Concord.system({Position, Drawable})
function DrawSystem:draw()
for _, e in ipairs(self.pool) do
@ -548,7 +548,7 @@ end
-- Create the World
local world = World()
local world = Concord.world()
-- Add the Systems
world:addSystems(MoveSystem, DrawSystem)
@ -571,11 +571,11 @@ local entity_3 = Concord.entity(world)
-- Emit the events
function love.update(dt)
world:emit(dt)
world:emit("update", dt)
end
function love.draw()
world:draw()
world:emit("draw")
end
```