Example #1
0
 void FillServicesList()
 {
     servicesProvidedList.ForEach(x => {
         servicesProvidedCell.Add(ServicesProvidedCell.Instantiate(cellPrefab, x, selectServiceDelegate));
         servicesProvidedByResponsible.Add(false);
     });
     StartCoroutine(OnFillServicesList());
 }
    void FillServicesList()
    {
        servicesProvidedCell.Clear();
        servicesProvidedByResponsible.Clear();

        servicesProvidedList.ForEach(x => {
            if (responsible.servicesProvided.ContainsKey(x.serviceID))
            {
                var cell = ServicesProvidedCell.Instantiate(cellPrefab, x, selectServiceDelegate, true);
                servicesProvidedCell.Add(cell);
                servicesProvidedByResponsible.Add(true);
            }
            else
            {
                var cell = ServicesProvidedCell.Instantiate(cellPrefab, x, selectServiceDelegate);
                servicesProvidedCell.Add(cell);
                servicesProvidedByResponsible.Add(false);
            }
        });
        StartCoroutine(OnFillServicesList());
    }