public void Populate(List <MatchData> _list, int _currentRound) { Clear(); int round = -1; uint idx = 0; foreach (MatchData data in _list) { if (data.Round > round) { round = data.Round; TextMeshProUGUI txt = Instantiate(roundLabelTemplate, content); txt.text = "Round " + (round + 1); if (round > _currentRound) { txt.color = Color.gray; } itemList.Add(txt.gameObject); } TournamentFixturesItem match = Instantiate(itemTemplate, content); match.Populate(data, idx); itemList.Add(match.gameObject); idx++; } }
public void AddMatch(MatchData _data) { TournamentFixturesItem match = Instantiate(itemTemplate, content); match.Populate(_data); if (itemList == null) { itemList = new List <GameObject>(); } itemList.Add(match.gameObject); }
private void PopulateList(List <MatchData> _list) { Clear(); uint idx = 0; foreach (MatchData data in _list) { TournamentFixturesItem match = Instantiate(itemTemplate, content); match.Populate(data, idx); itemList.Add(match.gameObject); idx++; } }
public void Populate(MatchData _data) { match.Populate(_data); }