Beispiel #1
0
        public bool IsColliding(Rectangle playground)
        {
            if (BodyList.Any(item => HeadElement.CheckCollision(item)))
            {
                return(true);
            }

            bool isColliding = !playground.Contains(HeadElement.Location);

            return(isColliding);
        }
Beispiel #2
0
 public bool CanEat(Meal meal)
 {
     return(HeadElement.CheckCollision(meal));
 }