Ejemplo n.º 1
0
 public void RenderGrid()
 {
     gridLayer.canvasImage.Width  = grid.width;
     gridLayer.canvasImage.Height = grid.height;
     gridLayer.image = new Image <Rgba32>(grid.resolutionX, grid.resolutionY);
     for (int x = 0; x <= grid.resolutionX - 1; x++)
     {
         for (int y = 0; y <= grid.resolutionY - 1; y++)
         {
             if (grid.GetPixel(x, y) == true)
             {
                 gridLayer.image[x, y] = new Rgba32(100, 250, 100, 255);
             }
             else
             {
                 gridLayer.image[x, y] = new Rgba32(0, 0, 0, 0);
             }
         }
     }
     gridLayer.UpdateImage();
 }