Resolve WES-192 "Fix progress screen"
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user