Esempio n. 1
0
 public void Draw(float dt, Rectangle2D bounds)
 {
     foreach (var item in objects.Where(x => x.Intersects(bounds)))
     {
         item.Draw(dt);
     }
 }
Esempio n. 2
0
        public static bool Intersects(ref Rectangle2D a, ref Rectangle2D b)
        {
            if (a.Right < b.Left ||
                a.Left > b.Right ||
                a.Top < b.Bottom ||
                a.Bottom > b.Top)
                return false;

            return true;
        }
Esempio n. 3
0
 public bool Intersects(Rectangle2D other)
 {
     return Rectangle2D.Intersects(ref this, ref other);
 }
Esempio n. 4
0
 public bool Intersects(Rectangle2D bounds)
 {
     return true;
 }