feat: add a way to get the terrain at a point
This commit is contained in:
parent
45fc9005b5
commit
a88b30dd9f
1 changed files with 7 additions and 0 deletions
|
@ -95,6 +95,13 @@ end
|
|||
-- TILE FUNCTIONS
|
||||
-- Get tiles
|
||||
|
||||
function TiledMultiMap:getTileTypeAtPoint(x, y)
|
||||
local wrapper = self:getMapAtPoint(x, y)
|
||||
if (wrapper ~= nil) then
|
||||
return wrapper:getTileTypeAtPoint(x, y)
|
||||
end
|
||||
end
|
||||
|
||||
function TiledMultiMap:haveTileTypeInRect(x, y, w, h, type)
|
||||
local listWrapper = self:getMapsInRect(x, y, w, h)
|
||||
for i, wrapper in ipairs(listWrapper) do
|
||||
|
|
Loading…
Reference in a new issue