sonic-bluestreak/sonic-bluestreak.love/game/modules/world/maps/tools/chunkterrain.lua
Kazhnuz 89c5940116 improvement: optimise chunk system
Diminishe the number of chunks and floor generated. Level loading will 
be a bit slower, but we basically double fps on test level
2020-02-01 14:24:23 +01:00

14 lines
286 B
Lua

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