public void SetContributorData(MapContributor contributor)
 {
     gameObject.SetActive(contributor != null);
     Contributor = contributor;
     if (contributor is null)
     {
         return;
     }
     nameText.text = contributor.Name;
 }
Пример #2
0
    public void AddNewContributor()
    {
        MapContributor      contributor = new MapContributor("", "", "");
        ContributorListItem listItem    = Instantiate(listItemPrefab, listContainer.transform).GetComponent <ContributorListItem>();

        listItem.Setup(contributor, this, true);
        contributors.Add(contributor);
        items.Add(listItem);
        StartCoroutine(WaitToScroll());
    }
Пример #3
0
    public void Setup(MapContributor contributor, ContributorsController contributorsControllerNew, bool dirty = false)
    {
        Contributor = contributor;
        controller  = contributorsControllerNew;
        _dirty      = dirty;

        nameText.text = Contributor.Name;
        roleText.text = Contributor.Role;
        imagePath     = Contributor.LocalImageLocation;

        if (gameObject.activeInHierarchy)
        {
            CheckLoadImage();
        }

        UpdateName();
    }
 public void RemoveContributor(MapContributor contributor)
 {
     contributors.Remove(contributor);
     RefreshContributorList();
 }