mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2026-07-21 23:56:50 -06:00
Make enabling/disabling Systems not use varargs.
This commit is contained in:
+6
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user