Allow named assemblages

This commit is contained in:
Tjakka5 2019-12-19 20:19:02 +01:00
parent d0e227485e
commit 276a053b7f
6 changed files with 56 additions and 9 deletions

View file

@ -15,7 +15,8 @@ local Systems = Concord.systems
local Entity = Concord.entity
local World = Concord.world
local World = Concord.world
local Worlds = Concord.worlds
Component("test_comp_1", function(e, x, y)
e.x = x
@ -58,12 +59,12 @@ function test_system:update2(dt) -- luacheck: ignore
end
local world = World()
local world = World("testWorld")
local entity = Entity()
entity:give(Components.test_comp_1, 100, 100)
world:addEntity(entity)
Worlds.testWorld:addEntity(entity)
world:addSystem(Systems.test_system, "update")
world:addSystem(Systems.test_system, "update", "update2")