Resolve WES-204 "User progress bug"

This commit is contained in:
Dries Van Schuylenbergh
2023-05-13 13:18:37 +00:00
committed by Louis Adriaens
parent 672ff367e2
commit 1413f80d73

View File

@@ -129,7 +129,7 @@ public abstract class AbstractMinigameController : AbstractFeedback
highestScores.Sort((a, b) => b.scoreValue.CompareTo(a.scoreValue)); highestScores.Sort((a, b) => b.scoreValue.CompareTo(a.scoreValue));
// Only save the top 10 scores, so this list doesn't keep growing endlessly // Only save the top 10 scores, so this list doesn't keep growing endlessly
progress.latestScores = latestScores.Take(10).ToList(); progress.latestScores = latestScores.TakeLast(10).ToList();
progress.highestScores = highestScores.Take(10).ToList(); progress.highestScores = highestScores.Take(10).ToList();
PersistentDataController.GetInstance().Save(); PersistentDataController.GetInstance().Save();