set the loc of sprite the spriteNum of me to getLoc(myAngle, myDistance)
else
destroy(me)
depleteRocketNum(gShipObj)
end if
end
on hitRockCheck me
repeat with i = 1 to count(asteroidList)
set asteroid to getAt(asteroidList, i)
if collision(the spriteNum of me, the spriteNum of asteroid) then
set the DESTROYED of me to 1
setDamage(asteroid, myPower, the loc of sprite the spriteNum of me)
set the DESTROYED of asteroid to 1
exit repeat
end if
end repeat
end
on collision interceptor, target
set myLoch to the locH of sprite interceptor
set myLocv to the locV of sprite interceptor
set leftLoch to the locH of sprite interceptor - (the width of the member of sprite interceptor / 4)
set topLocv to the locV of sprite interceptor - (the height of the member of sprite interceptor / 4)
set rightLoch to the locH of sprite interceptor + (the width of the member of sprite interceptor / 4)
set bottomLocv to the locV of sprite interceptor + (the height of the member of sprite interceptor / 4)
set minLoch to the left of sprite target
set maxLoch to the right of sprite target
set minLocv to the top of sprite target
set maxLocv to the bottom of sprite target
if ((myLoch > minLoch) and (myLoch < maxLoch) and ((myLocv > minLocv) and (myLocv < maxLocv))) or ((leftLoch > minLoch) and (leftLoch < maxLoch) and ((topLocv > minLocv) and (topLocv < maxLocv))) or ((rightLoch > minLoch) and (rightLoch < maxLoch) and ((bottomLocv > minLocv) and (bottomLocv < maxLocv))) then