Resolve WES-97 "Integrate signpredictor in spellingbee"

This commit is contained in:
Dries Van Schuylenbergh
2023-03-19 17:37:50 +00:00
committed by Lukas Van Rossem
parent f827c29d3a
commit 3abc24a39c
72 changed files with 3169 additions and 1886 deletions

View File

@@ -5,6 +5,11 @@ using UnityEngine;
/// </summary>
public class ListCoursesScreen : MonoBehaviour
{
/// <summary>
/// Reference to the userlist
/// </summary>
public UserList userList;
/// <summary>
/// Reference to the course-list container object
/// </summary>
@@ -25,6 +30,8 @@ public class ListCoursesScreen : MonoBehaviour
/// </summary>
void Start()
{
User user = userList.GetCurrentUser();
foreach (Course course in courseList.courses)
{
// Create instance of prefab
@@ -33,6 +40,9 @@ public class ListCoursesScreen : MonoBehaviour
// Dynamically load appearance
CourseItem item = instance.GetComponent<CourseItem>();
item.course = course;
Progress progress = user.GetCourseProgress(course.index);
item.progress = progress != null ? progress.Get<float>("courseProgress") : 0.0f;
}
}