public bool IsInside(CircleData circle) { var circlePosition = circle.GetPosition(); var circleRadius = circle.GetRadius(); if (x > circlePosition.x + circleRadius) { return(false); } if (x + width < circlePosition.x - circleRadius) { return(false); } if (y > circlePosition.y + circleRadius) { return(false); } if (y + height < circlePosition.y - circleRadius) { return(false); } return(true); }
public bool IsSameColor(CircleData circle) { return(circle.red == red); }