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 or x1 <= x4 and x4 <= x2)
+ elseif x1 == x2 and y3 == y4 then
+ intersect = (
+ x3 <= x1 and x1 <= x4
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!')