if x > @sprite[i].x and y > @sprite[i].y and x <= (@sprite[i].x + @sprite[i].bitmap.width) and y <= (@sprite[i].y + @sprite[i].bitmap.height) or
(@index == i and x > @sprite[i].x - x2 and y > @sprite[i].y - y2 and x <= (@sprite[i].x + @sprite[i].bitmap.width - x2) and y <= (@sprite[i].y + @sprite[i].bitmap.height - y2))