Beispiel #1
0
 public void SpreadDeitonBiome(Vertex v)
 {
     if (v.getBiome() == LOW_BIOME || v.getBiome() == OIL_BIOME || v.getBiome() == WATER_BIOME || v.getBiome() == STONE_BIOME)
     {
         v.setBiome(DEITON_BIOME);
         ResourceController resourceCont = (GameObject.FindObjectOfType(typeof(ResourceController)) as ResourceController);
         if (resourceCont != null)
         {
             resourceCont.DeitonMade(v);
         }
         Vertex[] neighbors = v.getNeighbors();
         for (int i = 0; i < neighbors.Length; i++)
         {
             if (neighbors[i].getHeight() < 0 && neighbors[i].getBiome() != STONE_BIOME)
             {
                 SpreadDeitonBiome(neighbors[i]);
             }
         }
     }
 }