| | |
| | | using System; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Linq; |
| | |
| | | { |
| | | public List<int[]> size { set; get; } |
| | | |
| | | [JsonIgnore] |
| | | public double minHeight { set; get; } |
| | | |
| | | [JsonIgnore] |
| | | public double maxHeight { set; get; } |
| | | |
| | | public Terrain() |
| | | { |
| | | size = new List<int[]>(); |
| | | this.size = new List<int[]>(); |
| | | |
| | | string str = ConfigurationManager.AppSettings["sizes"]; |
| | | if (string.IsNullOrEmpty(str)) return; |
| | |
| | | int i; |
| | | if (int.TryParse(s, out i)) |
| | | { |
| | | size.Add(new int[] { i, i }); |
| | | this.size.Add(new int[] { i, i }); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | this.size = size; |
| | | } |
| | | |
| | | public void SetHeight(double minHeight, double maxHeight) |
| | | { |
| | | this.minHeight = minHeight; |
| | | this.maxHeight = maxHeight; |
| | | } |
| | | } |
| | | } |