Esempio n. 1
0
    private void RefreshCityLine(AgeTransform tableitem, City city, int index)
    {
        tableitem.StartNewMesh = true;
        CityLine component = tableitem.GetComponent <CityLine>();

        component.Bind(city, this.selectionClient.gameObject);
        component.ReadOnly = this.ReadOnly;
        component.RefreshContent();
        component.AgeTransform.Enable = true;
        if (this.DisableCitiesWithoutSlotLeft)
        {
            component.DisableIfNoSlotLeft();
        }
        if (this.DisableCitiesWithHeroAssignmentImpossible)
        {
            component.DisableIfHeroAssignmentImpossible();
        }
        if (this.DisableCitiesInEncounter)
        {
            component.DisableIfGarrisonIsInEncounter();
        }
        if (this.DisableCitiesWithNoArmySpawnLocation)
        {
            component.DisableIfNoArmySpawnLocation();
        }
        if (this.DisableCitiesWithNoSeafaringArmySpawnLocation)
        {
            component.DisableIfNoSeafaringArmySpawnLocation();
        }
    }
Esempio n. 2
0
 public void EnforceRadio()
 {
     for (int i = 0; i < this.CitiesTable.GetChildren().Count; i++)
     {
         CityLine component = this.CitiesTable.GetChildren()[i].GetComponent <CityLine>();
         component.SelectionToggle.State = (component.City == CityLine.CurrentCity);
     }
 }