public void Draw(float dt, Rectangle2D bounds) { foreach (var item in objects.Where(x => x.Intersects(bounds))) { item.Draw(dt); } }
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; }
public bool Intersects(Rectangle2D other) { return Rectangle2D.Intersects(ref this, ref other); }
public bool Intersects(Rectangle2D bounds) { return true; }