您可以使用该Rectangle.IntersectsWith方法确定它们是否相交.
if (pictureBox1.Bounds.IntersectsWith(pictureBox2.Bounds))
{
//They have collided
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9885 次 |
| 最近记录: |