Exemple #1
0
 void randomFillMap()
 {
     for (int x = 0; x < ptr.getWidth(); x++)
     {
         for (int y = 0; y < ptr.getHeight(); y++)
         {
             Debug.Log("rnd work");
             if (Random.Range(0, 100) < setRandomFillPercent)
             {
                 grid[x, y] = 1;
             }
             else
             {
                 grid[x, y] = 0;
             }
         }
     }
     ptr.setGrid(grid);
 }