Esempio n. 1
0
    private void medalsFilled()
    {
        List <RankingUser> listOfUsers = data.getListOfUsers();

        listOfUsers.Sort();
        for (int i = 0; i < medals.Length; i++)
        {
            ScoreLineManager scoreLine = medals[i].GetComponent <ScoreLineManager>();
            RankingUser      user      = listOfUsers[i];
            scoreLine.setValues(user.getUser(), (i + 1).ToString(), user.getScore());
            //scoreLine.transform.localScale = new Vector3(1.0f, 0.3f, 0.3f);
        }
        waitingPanel.SetActive(false);
        rankingObtainedPanel.SetActive(true);
    }
Esempio n. 2
0
    public void dataFilled()
    {
        int count = 1;
        List <RankingUser> listOfUsers = data.getListOfUsers();

        listOfUsers.Sort();
        foreach (RankingUser user in listOfUsers)
        {
            //GameObject line = (GameObject)Resources.Load("RankingPosition");
            GameObject line = (GameObject)Instantiate(prefabLine, fatherCanvas.transform);
            line.transform.SetParent(fatherCanvas.transform);
            ScoreLineManager scoreLine = line.GetComponent <ScoreLineManager>();
            scoreLine.setValues(user.getUser(), count.ToString(), user.getScore());
            scoreLine.transform.localScale = new Vector3(1.0f, 0.3f, 0.3f);
            count++;
        }
        medalsFilled();
    }