//---------------------------------------------- Events - city ---------------------------------------------- private void City_InitMouse(BasicCityEvent cityEvent) { if (!(cityEvent.city.OutputInfo is OutputInfoWPF outInfo)) { throw new ApplicationException("Wrong OutputInfo in taw.game.controlable.playerControl.WPFLocalPlayer.City_InitLMBPress(BasicCityEvent cityEvent). Must be CityOutputInfoWPF"); } outInfo.cityShape.MouseLeftButtonDown += (a, b) => SelectCity(cityEvent.city, true); outInfo.warriorCnt.MouseLeftButtonDown += (a, b) => SelectCity(cityEvent.city, true); outInfo.cityShape.MouseRightButtonDown += (a, b) => SendUnits(cityEvent.city); outInfo.warriorCnt.MouseRightButtonDown += (a, b) => SendUnits(cityEvent.city); }
//---------------------------------------------- Ctor ---------------------------------------------- public BasicCity() { this.SetSettings(this.CreateLinkedSetting()); basicCityEvent = new BasicCityEvent(this); hashedPath = new Dictionary <BasicCity, List <KeyValuePair <int, int> > >(); }