صح فيه لاق لكن موب قوي لذيك الدرجة
بس انا عدت بناء الكود اللي عندك
وصار كذا
function isPositionInPosition(x, y, w, h, cx, cy)
return cx >= x and cx <= x+w and cy >= y and cy <= y+h
end
function isMouseInPosition(x, y, w, h)
if isCursorShowing( ) then
local cx, cy = getCursorPosition( )
return isPositionInPosition(x, y, w, h, cx, cy)
end
return false
end
function isPositionInCircle(x, y, r, cx, cy)
local i = 0
for k=(-r), r do
local q = math.sqrt((r/2)*(r/2)-k*k)
if isPositionInPosition(x-q+(r/2), y+k+(r/2), 2*q, 1, cx, cy) then
i = i+1
end
end
return i ~= (-r)+r
end
function isCircleInCircle(x, y, r, cx, cy, r2)
local i = 0
for k=(-r), r do
local q = math.sqrt((r/2)*(r/2)-k*k)
if isPositionInCircle(cx, cy, r2, x-q+(r/2), y+k+(r/2)) then
i = i+1
end
end
return i ~= (-r)+r
end