Resolve WES-117 "Persistent data handling"
This commit is contained in:
@@ -22,7 +22,7 @@ public class MinigameProgressCard : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Reference to the minigame progress
|
||||
/// </summary>
|
||||
public Progress minigameProgress;
|
||||
public PersistentDataController.SavedMinigameProgress minigameProgress;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the minigame list
|
||||
@@ -49,11 +49,11 @@ public class MinigameProgressCard : MonoBehaviour
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
Minigame minigame = minigameList.GetMinigameByIndex(minigameProgress.Get<MinigameIndex>("minigameIndex"));
|
||||
Minigame minigame = minigameList.GetMinigameByIndex(minigameProgress.minigameIndex);
|
||||
|
||||
thumbnail.sprite = minigame.thumbnail;
|
||||
title.text = minigame.title;
|
||||
List<Score> highscores = minigameProgress.Get<List<Score>>("highestScores");
|
||||
List<Score> highscores = minigameProgress.highestScores;
|
||||
int score = highscores.Count > 0 ? highscores[0].scoreValue : 0;
|
||||
highscore.text = $"Topscore: {score}";
|
||||
button.onClick.AddListener(selectActivity);
|
||||
|
||||
Reference in New Issue
Block a user