Resolve WES-117 "Persistent data handling"
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user