public override bool Collide(Rect rect) { if (rect.CheckIntersect(Bounds)) { int x = (int)((rect.left - AbsoluteLeft) / CellWidth); int y = (int)((rect.top - AbsoluteTop) / CellHeight); int w = (int)((rect.right - AbsoluteLeft - 1) / CellWidth) - x + 1; int h = (int)((rect.bottom - AbsoluteTop - 1) / CellHeight) - y + 1; return CheckRect(x, y, w, h); } else return false; }