diff --git a/gamecore/modules/world/baseworld.lua b/gamecore/modules/world/baseworld.lua index fb02132..c4a800c 100644 --- a/gamecore/modules/world/baseworld.lua +++ b/gamecore/modules/world/baseworld.lua @@ -10,6 +10,10 @@ function BaseWorld:registerEntity(entity) table.insert(self.entities, entity) end +function BaseWorld:countEntity() + return #self.entities +end + function BaseWorld:update(dt) for i,v in ipairs(self.entities) do v:update(dt)