Beispiel #1
0
    public void ShowNamesAndScores()
    {
        if (PlayerPrefs.HasKey("FirstName"))
        {
            firstName.text  = tsm.GetTopNames(1);
            secondName.text = tsm.GetTopNames(2);
            thirdName.text  = tsm.GetTopNames(3);
            forthName.text  = tsm.GetTopNames(4);
            fifthName.text  = tsm.GetTopNames(5);

            firstScore.text  = tsm.GetTopScores(1);
            secondScore.text = tsm.GetTopScores(2);
            thirdScore.text  = tsm.GetTopScores(3);
            forthScore.text  = tsm.GetTopScores(4);
            fifthScore.text  = tsm.GetTopScores(5);
        }
        else
        {
            Debug.Log("No top score record");
        }
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        List <int> scores = TopScoreManager.GetTopScores();

        for (int i = 0; i < 6; i++)
        {
            ScoresTexts[i].text = scores[i].ToString();
        }

        if (TopScoreManager.GetScorePosition() >= 0 && !SceneManager.GetActiveScene().name.Equals("Main Menu"))
        {
            ScoresTexts[TopScoreManager.GetScorePosition()].color = Color.yellow;
        }

        TopScoreManager.ResetTempValues();
    }