big-refactor #106

Merged
kazhnuz merged 24 commits from big-refactor into master 2021-05-07 19:30:53 +02:00
Showing only changes of commit 6c546e1e0e - Show all commits

View file

@ -148,8 +148,8 @@ function BaseWorld:getActorsInRect(x, y, w, h)
local query = {} local query = {}
local x2, y2 = x + w, y + h local x2, y2 = x + w, y + h
for i,v in ipairs(self.actors) do for i,v in ipairs(self.actors) do
if (v.x >= x) and (v.x + v.w >= x2) and if (v.x >= x) and (v.x + v.w <= x2) and
(v.y >= y) and (v.y + v.h >= y2) then (v.y >= y) and (v.y + v.h <= y2) then
table.insert(query, v) table.insert(query, v)
end end
@ -195,7 +195,7 @@ function BaseWorld:registerBody(body)
end end
function BaseWorld:updateBody(body) function BaseWorld:updateBody(body)
return self.x, self.y, {}, 0 return 0, 0, {}, 0
end end
function BaseWorld:removeBody(body) function BaseWorld:removeBody(body)