Ejemplo n.º 1
0
        private void OnCivGainedCity(Tuple <ICivilization, ICity> data)
        {
            var civ  = data.Item1;
            var city = data.Item2;

            if (CapitalCityCanon.GetCapitalOfCiv(civ) == null)
            {
                CapitalCityCanon.SetCapitalOfCiv(civ, city);
            }
        }
Ejemplo n.º 2
0
        public void DecomposeCapitalCities(SerializableMapData mapData)
        {
            for (int i = 0; i < mapData.Civilizations.Count; i++)
            {
                var civ     = CivFactory.AllCivilizations[i];
                var civData = mapData.Civilizations[i];

                if (civData.CapitalLocation != null)
                {
                    var capitalLocation = Grid.GetCellAtCoordinates(civData.CapitalLocation.Value);

                    var capitalCity = CityLocationCanon.GetPossessionsOfOwner(capitalLocation).FirstOrDefault();

                    CapitalCityCanon.SetCapitalOfCiv(civ, capitalCity);
                }
            }
        }