コード例 #1
0
    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++;
        }
    }
コード例 #2
0
    public void AddMatch(MatchData _data)
    {
        TournamentFixturesItem match = Instantiate(itemTemplate, content);

        match.Populate(_data);

        if (itemList == null)
        {
            itemList = new List <GameObject>();
        }
        itemList.Add(match.gameObject);
    }
コード例 #3
0
    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++;
        }
    }
コード例 #4
0
 public void Populate(MatchData _data)
 {
     match.Populate(_data);
 }