city-generation/Game/Assets/Scripts/Model/Config/TerrainGeneratorConfig.cs

48 lines
1.2 KiB
C#
Raw Normal View History

2015-03-13 15:36:12 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
2015-06-03 20:54:22 +00:00
namespace TransportGame.Model.Config
2015-03-13 15:36:12 +00:00
{
[XmlRoot("terrgenConfig")]
public class TerrainGeneratorConfig
{
[XmlElement("noiseOctaves")]
public int NoiseOctaves { get; set; }
[XmlElement("noiseNonLinearPower")]
public float NoiseNonLinearPower { get; set; }
[XmlElement("elevationScale")]
public float ElevationScale { get; set; }
[XmlElement("waterNonLinearPower")]
public float WaterNonLinearPower { get; set; }
2015-03-23 19:17:09 +00:00
[XmlElement("erodePoints")]
public int ErodePoints { get; set; }
[XmlElement("erodeIterations")]
public int ErodeIterations { get; set; }
[XmlElement("erodeAmountPercent")]
public float ErodeAmountPercent { get; set; }
2015-06-03 20:54:22 +00:00
/// <summary>
/// Initializes with default values
/// </summary>
public TerrainGeneratorConfig()
{
NoiseOctaves = 9;
NoiseNonLinearPower = 2.4f;
WaterNonLinearPower = 1.9f;
ElevationScale = 0.001f;
ErodePoints = 100;
ErodeIterations = 60;
ErodeAmountPercent = 0.1f;
}
2015-03-13 15:36:12 +00:00
}
}