Пример #1
0
 public bool CheckSickPerson(SickPerson sickPerson)
 {
     if (sickPerson.Center.X <= End + Width)
     {
         return(true);
     }
     return(false);
 }
Пример #2
0
 public bool CheckSickPerson(SickPerson sickPerson)
 {
     if ((X + Width / 2 - sickPerson.Center.X) * (X + Width / 2 - sickPerson.Center.X) + (Y + Height / 2 - sickPerson.Center.Y) * (Y + Height / 2 - sickPerson.Center.Y) <= Width * Height)
     {
         Lives--;
         return(true);
     }
     return(false);
 }