public HexRegion(int n, int seed, int region_size, int elevation, float water, int rivers, Noise noise) { this.n = n; this.seed = seed; this.region_size = region_size; this.center = region_size / 2f; this.elevation = elevation; this.noise = noise; this.water = water; RegionParams.InitializeWorldGenerationParams(this); CreateHexPositionVectors(this.n); computeElevationParameters(); RegionParams.UpdateWorldGenerationParams(this); //computeErosion(RegionParams.erosionWaterAmount, RegionParams.erosionStrength, RegionParams.erosionWaterLoss, // RegionParams.earthStability, RegionParams.erosionVelocityElevationCap, RegionParams.erosionIterations); computeElevationParameters(); computeTemperatures(); generateWaterTiles(this.water); Debug.Log("Generated Region with " + this.getViewableTiles().Count + "/" + this.n + " viewable tiles; hexsize " + this.hexSize + ", hexheight " + this.hexHeight + ", water level elevation " + this.waterLevelElevation + "; min/avg/max elevations = " + this.minElevation + "/" + this.averageElevation + "/" + this.maxElevation); }
/// <summary> /// Initializes a new instance of the <see cref="NodeParams"/> class. /// </summary> public NodeParams(RegionParams parentRegionParams, Type type, string name) { this.ParentRegionParams = parentRegionParams; // If this region is child of an higher region in the hierarchy then updates the set of child regions of the latter if (this.ParentRegionParams != null) { this.ParentRegionParams.Children.Add(this); } this.Type = type; this.Name = name; }
/// <summary> /// Initializes a new instance of the <see cref="NodeParams"/> class. /// </summary> public RegionParams(RegionParams parentRegionParams, string name) : base(parentRegionParams, Type.Region, name) { }
/// <summary> /// Initializes a new instance of the <see cref="NodeParams"/> class. /// </summary> public FileSensorParams(RegionParams parentRegionParams, string name) : base(parentRegionParams, Type.FileSensor, name) { }
/// <summary> /// Initializes a new instance of the <see cref="NodeParams"/> class. /// </summary> public DatabaseSensorParams(RegionParams parentRegionParams, string name) : base(parentRegionParams, Type.DatabaseSensor, name) { }