public bool CheckDisinfectant(Disinfectant disinfectant) { if ((X + Width / 2 - disinfectant.Center.X) * (X + Width / 2 - disinfectant.Center.X) + (Y + Height / 2 - disinfectant.Center.Y) * (Y + Height / 2 - disinfectant.Center.Y) <= Width * Height) { return(true); } return(false); }
public bool CheckDisinfectant(Disinfectant disinfectant) { if (disinfectant.Center.X <= End + Width) { return(true); } return(false); }