Exemplo n.º 1
0
        /// <summary>
        /// Draw a minimap of the level
        /// </summary>
        private void DrawMiniMap()
        {
            Graphics minimapG = panel2.CreateGraphics();

            minimapG.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
            minimapG.FillRectangle(new Pen(panel2.BackColor).Brush, 15, eraseSelection.Location.Y - (gridW * 6 / 2), gridW * 5, gridH * 5);
            minimapG.DrawImage(Minimap.DrawMinimap(level, gridW, gridH, tileSize, tileSize), 15, eraseSelection.Location.Y - (gridW * 6 / 2), gridW * 5, gridH * 5);
            minimapG.DrawRectangle(Pens.Black, 10, eraseSelection.Location.Y - (gridW * 6 / 2) - 5, gridW * 5 + 5, gridH * 5 + 5);
        }