Exemplo n.º 1
0
        public void OnScoreSaved(Score score)
        {
            scoreSection.Hide();

            overPanel.cheerText.text = "Yay! Made it!";
            overPanel.scoreText.text = score.score.ToString();
            overPanel.rankText.text  = "Rank: " + score.rank.ToString();

            Score[] topScores = dataAgent.GetTopScores(overPanel.scoreListLimit, 0);
            for (int i = 0; i < topScores.Length; i++)
            {
                if (topScores[i] == score)
                {
                    overPanel.SetScoreListItem(topScores[i], true);
                }
                else
                {
                    overPanel.SetScoreListItem(topScores[i]);
                }
            }

            overPanel.Show();
        }