Allow for blank components

This commit is contained in:
Tjakka5 2019-12-22 23:17:16 +01:00
parent 144a42dc9e
commit a8bc92a951
2 changed files with 7 additions and 6 deletions

View file

@ -29,9 +29,7 @@ end)
Components.register("test_comp_2", test_comp_2)
local test_comp_3 = Component(function(e, b)
e.b = b
end)
local test_comp_3 = Component()
Components.register("test_comp_3", test_comp_3)
@ -72,7 +70,7 @@ entity
:give(Components.test_comp_1, 100, 100)
:remove(Components.test_comp_1)
:give(Components.test_comp_1, 200, 100)
:give(Components.test_comp_3, 200, 100)
Worlds.testWorld:addEntity(entity)