mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
Merge branch 'master' of https://github.com/Tjakka5/Concord
This commit is contained in:
commit
5252b0901b
1 changed files with 5 additions and 5 deletions
|
@ -536,7 +536,7 @@ function MoveSystem:update(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local DrawSystem = Concord.System({Position, Drawable})
|
local DrawSystem = Concord.system({Position, Drawable})
|
||||||
|
|
||||||
function DrawSystem:draw()
|
function DrawSystem:draw()
|
||||||
for _, e in ipairs(self.pool) do
|
for _, e in ipairs(self.pool) do
|
||||||
|
@ -548,7 +548,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- Create the World
|
-- Create the World
|
||||||
local world = World()
|
local world = Concord.world()
|
||||||
|
|
||||||
-- Add the Systems
|
-- Add the Systems
|
||||||
world:addSystems(MoveSystem, DrawSystem)
|
world:addSystems(MoveSystem, DrawSystem)
|
||||||
|
@ -571,11 +571,11 @@ local entity_3 = Concord.entity(world)
|
||||||
|
|
||||||
-- Emit the events
|
-- Emit the events
|
||||||
function love.update(dt)
|
function love.update(dt)
|
||||||
world:emit(dt)
|
world:emit("update", dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.draw()
|
function love.draw()
|
||||||
world:draw()
|
world:emit("draw")
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue