Exemple #1
0
 public static bool VaChamVatCan(Oggy oggy, VatCan vatCan)
 {
     if (vatCan.bVisible == true)
     {
         Rectangle rect = new Rectangle(Oggy.iLeft, oggy.Location.Y, Oggy.iWidth, Oggy.iHeight);
         //Xét tại tâm vật cản có thuộc region của Oggy
         if (IsInRegion(rect, new Point(vatCan.Location.X + vatCan.Img.Width / 2, vatCan.Location.Y + vatCan.Img.Height / 2)))
         {
             if (frmMenu.isPlayFXMucsic)
             {
                 FX.OggyHit();
             }
             return(true);
         }
     }
     return(false);
 }