Esempio n. 1
0
 //Draw the content of this "mini-map" (aka the Block)
 public void Draw()
 {
     for (int i = 0; i < Cells.GetLength(0); i++)
     {
         for (int j = 0; j < Cells.GetLength(1); j++)
         {
             if (Cells[i, j])
             {
                 //Relative position in the actual game map
                 //Measured from the top left corner of the whole game map
                 Drawer.DrawCell(PosX + i, PosY + j, Colors.Green);
             }
         }
     }
 }
Esempio n. 2
0
 public void Draw()
 {
     //Draws the game area outline
     Drawer.DrawOutline(0, 0, SizeX, SizeY);
     //Loop through all the cells in the map
     for (int i = 0; i < Map.GetLength(0); i++)     //Map.GetLength(0) -> horizontal size
     {
         for (int j = 0; j < Map.GetLength(1); j++) //Map.GetLength(1) -> vertical size
         {
             //If a cell is present at the current position
             if (Map[i, j])
             {
                 //Draw the cell here
                 Drawer.DrawCell(i, j, Colors.Pink);
             }
         }
     }
 }