Example #1
0
        public bool Intersect(RectGameObject that)
        {
            Rectangle a = new Rectangle((int)this.Position.X, (int)this.Position.Y, (int)this.Width, (int)this.Height);
            Rectangle b = new Rectangle((int)that.Position.X, (int)that.Position.Y, (int)that.Width, (int)that.Height);

            return(a.Intersects(b));
        }
Example #2
0
 public bool Intersect(RectGameObject that)
 {
     Rectangle a = new Rectangle((int) this.Position.X, (int) this.Position.Y, (int) this.Width, (int) this.Height);
     Rectangle b = new Rectangle((int) that.Position.X, (int) that.Position.Y, (int) that.Width, (int) that.Height);
     return a.Intersects(b);       
 }