Resolve WES-117 "Persistent data handling"

This commit is contained in:
Dries Van Schuylenbergh
2023-04-04 17:00:47 +00:00
parent 3499e61bb0
commit 5f4408063f
82 changed files with 1963 additions and 1190 deletions

View File

@@ -21,7 +21,7 @@ public class CourseProgressCard : MonoBehaviour
/// <summary>
/// Reference to the progress so we can display a progress bar
/// </summary>
public Progress courseProgress;
public PersistentDataController.SavedCourseProgress courseProgress;
/// <summary>
/// Reference to the list of courses so we can query the correct course
@@ -48,11 +48,11 @@ public class CourseProgressCard : MonoBehaviour
/// </summary>
void Start()
{
Course course = courseList.GetCourseByIndex(courseProgress.Get<CourseIndex>("courseIndex"));
Course course = courseList.GetCourseByIndex(courseProgress.courseIndex);
thumbnail.sprite = course.thumbnail;
title.text = course.title;
progressBar.value = courseProgress.Get<float>("courseProgress");
progressBar.value = courseProgress.progress;
button.onClick.AddListener(selectActivity);
}
}