コード例 #1
0
 // Adds a new score
 public void SubmitScore(string playerName, int score)
 {
     m_scores.AddScore(new Score(playerName, score)
     {
         isCurrent = true
     });                                                   // Add the new score to the list. (also sorts, and marks it as a score gotten this run)
     PlayerPrefs.SetString("scores", m_scores.ToBase64()); // Save to PlayerPrefs
     RespawnScores();                                      // Reload ui
 }