矩形碰撞檢測

當鼠標移動到圖片範圍內則返回TRUEspa     private   int  afoul( int  x,  int  y)         {                       if  (b.X  <  a.X  &&  (b.X  +  width)  >  a.X  &&  (b.Y  -  height)  <  a.Y  &&  b.Y  >  a.Y)          
相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息