detects collision between two images
detects collision between two images
Rate detects collision between two images
(1(1 Vote))
dim collided as integer
' a = image1 name
' b = image2 name
function collided (a as image,b as image) as integer
dim AcenterX as integer
dim AcenterY as integer
dim BCenterX as integer
dim BcenterY as integer
ACenterX = a.top
AcenterY = a.height
bcenterX = B.top
BCentery = B.height
collided = false
if abs(AcenterX - bcenterx) = 0 then
if abs(AcenterY - bcenterY) = 0 then
collided = true
end if
end if
end function
detects collision between two images Comments
No comments yet — be the first to post one!
Post a Comment