示例#1
0
        public bool Collide(PhysicalObject po)
        {
            if (new Rectangle((int)X + 4, (int)Y, Width - 8, Height).IntersectsWith(po.collision))
            {
                po.Invoke();
                if (po.Collidable)
                {
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
        public bool Stands(PhysicalObject po)
        {
            if (new Rectangle((int)X + 4, (int)(Y + 4) + (Height - 4), Width - 8, 1).IntersectsWith(
                    new Rectangle((int)po.X, (int)po.Y, po.Width, 1)))
            {
                po.Invoke();
                if (po.Collidable)
                {
                    return(true);
                }
            }

            return(false);
        }