void populate()
        {
            foreach (GameCountry country in GameCountry.GetStartingGameCountries())
            {
                if (country == null)
                {
                    Debug.Log("Country shouldn't be null here.");
                    continue;
                }
                bool countryHasBeenSpawned = mapUtils.DoesCountryExist(country.Name);

                foreach (ProvinceIdentifier identifier in country.GetProvinceIdentifiers())
                {
                    if (!countryHasBeenSpawned)
                    {
                        mapUtils.SpawnNewCountry(identifier, country);
                        countryHasBeenSpawned = true;
                    }
                    else
                    {
                        mapUtils.TransferControlOfProvince(identifier, country);
                    }
                }
                mapUtils.ToggleNationFlagsOnMap(true);
            }
        }
Esempio n. 2
0
 public void ToggleNationFlagsOnMap(bool useFlags)
 {
     foreach (GameCountry country in GameCountry.GetStartingGameCountries())
     {
         if (!DoesCountryExist(country.Name))
         {
             continue;
         }
         var newCountryIndex = _map.GetCountryIndex(_map.GetCountry(country.Name));
         _map.ToggleCountryMainRegionSurface(newCountryIndex, useFlags, _flagProvider.getFlag(country.Flag));
     }
 }