Resolve WES-192 "Fix progress screen"

This commit is contained in:
Dries Van Schuylenbergh
2023-05-04 09:09:49 +00:00
parent 259259ac9c
commit 89f343780a
34 changed files with 4330 additions and 496 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
@@ -53,9 +54,11 @@ public class MinigameProgressCard : MonoBehaviour
thumbnail.sprite = minigame.thumbnail;
title.text = minigame.title;
List<Score> highscores = minigameProgress.highestScores;
int score = highscores.Count > 0 ? highscores[0].scoreValue : 0;
highscore.text = $"Topscore: {score}";
button.onClick.AddListener(selectActivity);
List<Score> highscores = minigameProgress.highestScores;
if (0 < highscores.Count)
highscore.text = $"TOPSCORE: {highscores.Max((s) => s.scoreValue)}";
else
highscore.text = "(NOG) GEEN TOPSCORE";
}
}