Exemplo n.º 1
0
    private void UpdateScores()
    {
        foreach (string playerName in GameManager.GetPlayerScores().Keys)
        {
            GameObject scoreLineGO = Instantiate(scoreLinePrefab);
            scoreLineGO.transform.SetParent(scoreLineListParent);
            ScoreLine sl = (ScoreLine)scoreLineGO.GetComponent <ScoreLine>();

            if (sl != null)
            {
                PlayerScore p = GameManager.GetPlayerScore(playerName);
                sl.Setup(playerName, p.GetFrags(), p.GetDeaths());
            }

            scoreLineList.Add(scoreLineGO);
        }
    }