9 lines
248 B
Lua
9 lines
248 B
Lua
local physics = {
|
|
}
|
|
|
|
function physics.boxCollide(a, b)
|
|
return ((a.x > b.x and a.x < b.x + b.width) or (a.x <= b.x and b.x < a.x + a.width)) and ((a.y > b.y and a.y < b.y + b.height) or (a.y <= b.y and b.y < a.y + a.height))
|
|
end
|
|
|
|
return physics
|