sonic-bluestreak/sonic-bluestreak.love/game/modules/subgames/world/maps/tools/chunkterrain.lua

15 lines
286 B
Lua
Raw Permalink Normal View History

local ChunkTerrain = Object:extend()
function ChunkTerrain:new(x, y, w, h)
self.x = x
self.y = y
self.w = w
self.h = h
end
function ChunkTerrain:isInside(x, y)
return ((x >= self.x) and (x < self.x+self.w) and (y >= self.y) and (y < self.y+self.h))
end
return ChunkTerrain