mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-01 20:03:55 -04:00
Allow named assemblages
This commit is contained in:
parent
d0e227485e
commit
276a053b7f
6 changed files with 56 additions and 9 deletions
7
main.lua
7
main.lua
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue