scenes/levels: more wrapper to the bump functions
This commit is contained in:
parent
ff13de2e3c
commit
f65424f265
|
@ -117,6 +117,6 @@ end
|
|||
|
||||
function Level:getVisibleEntities()
|
||||
local camx, camy, camw, camh = self:getScreenCoord()
|
||||
local visibleThings, len = self.world:queryRect(camx-64, camy-64, camw+128, camh+128)
|
||||
local visibleThings, len = self:queryRect(camx-64, camy-64, camw+128, camh+128)
|
||||
return visibleThings, len
|
||||
end
|
||||
|
|
|
@ -120,6 +120,14 @@ function Level:removeEntity(entity)
|
|||
return self.world:remove(entity)
|
||||
end
|
||||
|
||||
function Level:queryRect(x, y, w, h)
|
||||
return self.world:queryRect(x, y, w, h)
|
||||
end
|
||||
|
||||
function Level:countEntities()
|
||||
return self.world:countItems()
|
||||
end
|
||||
|
||||
function Level:worldUpdate(dt)
|
||||
--l,t,w,h = l or 0, t or 0, w or self.width, h or self.height
|
||||
local visibleThings, len = self:getVisibleEntities()
|
||||
|
|
Loading…
Reference in New Issue