From 0d96ebc90c9740e7e66a70aa11168b11f49d220b Mon Sep 17 00:00:00 2001 From: sanine-a Date: Fri, 12 May 2023 14:10:48 -0500 Subject: run working program with refactored code --- honey/ecs/ecs.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'honey/ecs/ecs.lua') diff --git a/honey/ecs/ecs.lua b/honey/ecs/ecs.lua index d7eb4ac..0c84041 100644 --- a/honey/ecs/ecs.lua +++ b/honey/ecs/ecs.lua @@ -77,11 +77,9 @@ end -- load database from file function EntityDb.load(self, filename) - print(collectgarbage("count")) self.entities = {} self.components = {} collectgarbage() - print(collectgarbage("count")) local env = { Entity = function(id, components) self:createEntity(id) @@ -320,7 +318,6 @@ function SystemDb.update(self, dt) -- check for dangling dependencies local dangle = "" for dependency in pairs(self.dangling) do - print(dependency) dangle = dangle .. string.format( "unresolved dangling dependency: %s\n", dependency @@ -330,11 +327,10 @@ function SystemDb.update(self, dt) error(dangle) end - for _, name in ipairs(self.sort) do local system = self.systems[name] local params = self.params[name] - system.f(self.db, dt, params) + system.f(self.entityDb, dt, params) end end -- cgit v1.2.1