Fix CourseProgressCard prefab missing script reference

This commit is contained in:
Dries Van Schuylenbergh
2023-03-23 12:09:43 +00:00
committed by Louis Adriaens
parent 0e997666e2
commit db37a16155
3 changed files with 11 additions and 10 deletions

View File

@@ -211,8 +211,16 @@ public class UserProgressScreen : MonoBehaviour
private void DisplayMinigameGraph(MinigameIndex minigameIndex)
{
Progress progress = user.GetMinigameProgress(minigameIndex);
List<Score> scores = progress.Get<List<Score>>("latestScores");
PlotGraph(scores.ConvertAll<double>((s) => (double)s.scoreValue), progress.Get<List<Score>>("highestScores")[0].scoreValue);
List<Score> latestScores = progress.Get<List<Score>>("latestScores");
List<Score> highestScores = progress.Get<List<Score>>("highestScores");
if (0 < highestScores.Count)
{
PlotGraph(latestScores.ConvertAll<double>((s) => (double)s.scoreValue), highestScores[0].scoreValue);
}
else
{
progressGraph.gameObject.SetActive(false);
}
}
/// <summary>