public static void AddNewUserScore(string levelName, UserScore userScore)
        {
            if (string.IsNullOrWhiteSpace(levelName))
            {
                throw new ArgumentException("Level name can not be empty", nameof(levelName));
            }
            var levelScore = LevelScores.Single(s => s.LevelName == levelName);

            if (levelScore is null)
            {
                Debug.LogError("Level Scores json not initialized or level not found");
                return;
            }

            levelScore.AddScore(userScore);
        }
예제 #2
0
 public void AddScore(UserScore userScore)
 {
     _scores.Add(userScore);
 }