Remove world.systemIndices to fix possible obscure bugs.

Remove tiny.getSystemIndex(world, system) in favor of a System 'index'
field.
Add some comments and documentation.
This commit is contained in:
bakpakin
2015-07-06 23:28:50 -04:00
parent 19ae03707f
commit ce8ca35f7e
2 changed files with 18 additions and 28 deletions
+2 -2
View File
@@ -211,8 +211,8 @@ describe('tiny-ecs:', function()
world:update(1)
world:setSystemIndex(moveSystem, 2)
world:update(1)
assert.equals(2, world:getSystemIndex(moveSystem))
assert.equals(1, world:getSystemIndex(oneTimeSystem))
assert.equals(2, moveSystem.index)
assert.equals(1, oneTimeSystem.index)
end)
it("Sorts Entities in Sorting Systems", function()