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

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

            return(isColliding);
        }
コード例 #2
0
 public bool CanEat(Meal meal)
 {
     return(HeadElement.CheckCollision(meal));
 }