end
function doLinesIntersect(x1,y1, x2,y2, x3,y3, x4,y4)
end
function doLinesIntersect(x1,y1, x2,y2, x3,y3, x4,y4)
- return false
- else
- -- if lines are not parallel, they must intersect
- -- do segments overlap?
- if
- x1 <= x3 and x3 <= x2
- and y1 <= y3 and y3 <= y2
- or
+ elseif x1 == x2 and y3 == y4 then
+ intersect =
end
function doesLineIntersectPlayerPaths(path, x1,y1, x2,y2)
end
function doesLineIntersectPlayerPaths(path, x1,y1, x2,y2)
-- love collision handler
function collision(player)
print('Player '..tostring(player)..' crashed!')
-- love collision handler
function collision(player)
print('Player '..tostring(player)..' crashed!')