Esempio n. 1
0
 /// <summary>
 /// Construct new drainage map
 /// </summary>
 public DrainageMap(Size dimensions, int seed, WorldParameters parameters, HeightMap heightMap)
     : base(dimensions, seed, parameters)
 {
     this.Elevation          = heightMap;
     this.StandardDerivation = new float[dimensions.Width, dimensions.Height];
     this.NoiseValues        = new float[dimensions.Width, dimensions.Height];
     this.DrainageTiles      = new Tile[dimensions.Width, dimensions.Height];
     this.Generate();
 }
Esempio n. 2
0
 /// <summary>
 /// Construct new rainfall map
 /// </summary>
 public RainfallMap(Size dimensions, int seed, WorldParameters parameters, HeightMap elevation)
     : base(dimensions, seed, parameters)
 {
     this.Elevation     = elevation;
     this.RainfallTiles = new Tile[dimensions.Width, dimensions.Height];
     this.RainShadow    = new float[dimensions.Width, dimensions.Height];
     this.NoiseValues   = new float[dimensions.Width, dimensions.Height];
     this.Generate();
 }
Esempio n. 3
0
        /// <summary>
        /// Construct new resource generator instance
        /// </summary>
        public ResourceGenerator(Size dimensions, int seed, TerrainType[,] biomes, WorldParameters parameters)
        {
            Biomes     = biomes;
            Seed       = seed;
            Dimensions = dimensions;
            Parameters = parameters;

            this.BuildSpawnTables();
            this.GenerateResources();
        }
Esempio n. 4
0
        /// <summary>
        /// Create new temperature map
        /// </summary>
        public TemperatureMap(Size dimensions, int seed, WorldParameters parameters, HeightMap elevation)
            : base(dimensions, seed, parameters)
        {
            this.TemperatureLevels = new TemperatureLevel[dimensions.Width, dimensions.Height];
            this.TemperatureTiles  = new Tile[dimensions.Width, dimensions.Height];
            this.NoiseValues       = new float[dimensions.Width, dimensions.Height];
            this.Gradient          = new float[dimensions.Width, dimensions.Height];
            this.Elevation         = elevation;

            this.Generate();
        }
Esempio n. 5
0
 /// <summary>
 /// Create a new height map.
 /// </summary>
 public HeightMap(Size dimensions, int seed, WorldParameters parameters)
     : base(dimensions, seed, parameters)
 {
     this.HeightLevels = new HeightLevel[dimensions.Width, dimensions.Height];
     this.Generate();
 }