Exemplo n.º 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));
        }
Exemplo n.º 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);       
 }