Make enabling/disabling Systems not use varargs.

This commit is contained in:
bakpakin
2015-05-03 23:28:18 +08:00
parent fb345c7718
commit 6d1b280a40
2 changed files with 14 additions and 16 deletions
+6 -2
View File
@@ -139,14 +139,18 @@ describe('tiny-ecs:', function()
end)
it("Disable and Enable Systems", function()
world:deactivate(moveSystem, oneTimeSystem)
world:deactivate(moveSystem)
world:deactivate(oneTimeSystem)
world:update(1)
assert.equals(world:getSystemCount(), 2)
assert.equals(timePassed, 0)
assert.equals(entity1.xform.x, entityTemplate1.xform.x)
world:activate(moveSystem, oneTimeSystem)
world:activate(moveSystem)
world:activate(oneTimeSystem)
world:update(1)
assert.equals(timePassed, 1)
assert.are_not.equal(entity1.xform.x, entityTemplate1.xform.x)
assert.equals(world:getSystemCount(), 2)
end)
it("Clear Entities", function()