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

@@ -17,15 +17,10 @@ public class CourseActivityScreen : MonoBehaviour
/// </summary>
public CourseList courseList;
/// <summary>
/// Reference to the users
/// </summary>
public UserList userList;
/// <summary>
/// Reference to the course progress
/// </summary>
private Progress progress;
private PersistentDataController.SavedCourseProgress progress;
/// <summary>
/// Title Display
@@ -66,10 +61,10 @@ public class CourseActivityScreen : MonoBehaviour
//slider.value = progressValue;
// Set progress
userList.Load();
progress = userList.GetCurrentUser().GetCourseProgress(course.index);
PersistentDataController.GetInstance().Load();
progress = UserList.GetCurrentUser().GetCourseProgress(course.index);
if (progress != null)
progressBar.value = progress.Get<float>("courseProgress");
progressBar.value = progress.progress;
else
progressBar.value = 0.0f;
}