diff --git a/lib/level/level.lua b/lib/level/level.lua index 4ebffa8..2918cf0 100644 --- a/lib/level/level.lua +++ b/lib/level/level.lua @@ -45,7 +45,10 @@ function level:update(dt) end mposCache = tostring(mpos) -- path = (require "lib.pathfinder")(charPos, mpos) + else + mposCache = nil end + self.camera:update(dt) self.selector:update(dt) end diff --git a/lib/level/map.lua b/lib/level/map.lua index 07ee49c..f8b72cd 100644 --- a/lib/level/map.lua +++ b/lib/level/map.lua @@ -23,4 +23,8 @@ function map:draw() end end +function map:get(x, y) + return self[x][y] +end + return { new = new }