开发者

How to determine if a rectangle was intersected by any other rectangle in a form C# not XNA

I want to determine if a rectangle is intersected by any other rectangle in the form in C# not in XNA.

So here's a scenario. Rectangles A and B change location random开发者_开发技巧ly (using a timer) in the form while Rectangle C is static. None of the rectangles should know about each other so

if (RectA.IntersectsWith(RectB))
            {
                MessageBox.Show("KAPOW");
            }

is not ideal...

Cheers for any help you can give me.


What's wrong with System.Drawing.Rectangle.InterectsWith() method?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜