public void BuildLandmark(ELandmark lm, CTile tile) { switch (lm) { case (ELandmark.Flat_Hill): { new FlatHillBuilder().BuildLandmark(tile); } break; case (ELandmark.Pond): { new PondBuilder().BuildLandmark(tile); } break; case (ELandmark.Ridge): { new RidgeBuilder().BuildLandmark(tile); } break; } }
private void HandleIndex(string name, string param, string value, ref ELandmark type) { if (EnumUtil <ELandmark> .TryGetEnumValue(name, ref type)) { if (!this.table.Table.ContainsKey(type)) { this.table.Table.Add(type, new LandmarkParams(type)); } switch (param) { case ("Height"): { this.table.Table[type].Height = int.Parse(value); } break; case ("RadiusMax"): { this.table.Table[type].RadiusMax = int.Parse(value); } break; case ("RadiusMin"): { this.table.Table[type].RadiusMin = int.Parse(value); } break; case ("LengthMax"): { this.table.Table[type].LengthMax = int.Parse(value); } break; case ("LengthMin"): { this.table.Table[type].LengthMin = int.Parse(value); } break; } } }
public LandmarkParams(ELandmark type) { this._type = type; }