public SpotEntity(CityEntityType type) : this() { if ((type & CityEntityType.Spot) == CityEntityType.Spot) { EntityType = type; } }
public override void MouseClickHandler(object sender, MouseEventArgs e) { // mod 20110801 string[] types = { "0", "Retail", "Transit", "CrossCityTransportation", "Medical", "Education", "Pollution", "ZeroOne" }; CityEntityType type = types[TaskPanel.Current.cbbAddEnt.SelectedIndex].ParseToEnum <CityEntityType>(); DisplayManager.Current.AddSpot(type, DisplayManager.Current.CityCoordinate(e.X, e.Y)); ValueBuffer.UpdateValues(); }
public void AddSpot(CityEntityType type, Point2D pos) { SpotEntity spot = new SpotEntity(type); spot.Position = pos; spot.ServingRadius = 600.0; spot.Coefficient = 1200.0; _cityModel.CitySpots.Add(spot); _cityModel.Factors.Add(spot); }