From 91f5799e5006d2be05f3638d0030e33fe56f222b Mon Sep 17 00:00:00 2001 From: Jack Robinson Date: Thu, 9 Jan 2020 22:12:39 +1300 Subject: [PATCH] README: Fix 'Quick Example' to be runnable --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index abc57e1..d7aea42 100644 --- a/README.md +++ b/README.md @@ -536,19 +536,19 @@ 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 local position = e[Position] - + love.graphics.circle("fill", position.x, position.y, 5) end 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 ```