public TerrainOptions(
     LayerTerrainOptions outside,
     LayerTerrainOptions entry,
     LayerTerrainOptions middle,
     LayerTerrainOptions far,
     RiverTerrainOptions river
     )
 {
     Outside = outside;
     Entry   = entry;
     Middle  = middle;
     Far     = far;
     River   = river;
 }
Ejemplo n.º 2
0
        // Walks the left-edge of the map filling in to the right where a
        // terrain hasn't otherwise been specified.
        private static void FillOutsideEdge(
            ITerrainManager terrainManager,
            IMap map,
            LayerTerrainOptions terrainOptions
            )
        {
            ITerrain terrain = terrainManager.GetByIdName(terrainOptions.IdName);

            for (int row = 0; row < map.Rows; row++)
            {
                int  counter = 0;
                bool terrainUpdated;
                do
                {
                    terrainUpdated = false;
                    ref MapCell cell = ref map.GetCell(counter, row);
                    while (cell.TerrainId == 0)
                    {
                        cell.TerrainId = terrain.Id;
                        counter++;
                        terrainUpdated = true;
                    }
                } while(terrainUpdated);
            }