Example #1
0
        private void DrawRectangles(Grid<Item> items, Graphics g)
        {
            int w = Controller.TileSize.Width;
            int h = Controller.TileSize.Height;

            items.Each((item, p) =>
            {
                var dest = new Rectangle(p.X * w, p.Y * h, w, h);
                g.DrawImage(_image, dest, item.Sprite.Rectangle, GraphicsUnit.Pixel);
            });
        }