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,7 @@
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:63c63e721f65ebb7d871cb9ef49f4752",
"GUID:1631ed2680c61245b8211d943c1639a8",
"GUID:5c2b5ba89f9e74e418232e154bc5cc7a",
"GUID:7f2d0ee6dd21e1d4eb25b71b7a749d25"
],
"includePlatforms": [],

View File

@@ -7,11 +7,15 @@ using UnityEngine.UI;
/// </summary>
public class CourseActivityScreen : MonoBehaviour
{
// vvv TEMPORARY STUFF vvv
public GameObject playButton;
public GameObject previewButton;
// ^^^ TEMPORARY STUFF ^^^
/// <summary>
/// Reference to the courses
/// </summary>
public CourseList courseList;
// private float maxvalue; In case we want to change progress e.g. amount of words correct, then change maxvalue amount of words etc.
/// <summary>
/// Reference to the users
@@ -51,6 +55,11 @@ public class CourseActivityScreen : MonoBehaviour
int index = courseList.currentCourseIndex;
Course course = courseList.courses[index];
// vvv TEMPORARY STUFF vvv
playButton.SetActive(course.theme.model != null);
previewButton.SetActive(course.theme.model == null);
// ^^^ TEMPORARY STUFF ^^^
title.text = course.title;
description.text = course.description;
courseImage.sprite = course.thumbnail;

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;
}
}

View File

@@ -53,7 +53,7 @@ public class MinigameItem : MonoBehaviour
// Add click functionality
button.onClick.AddListener(() =>
{
minigameList.SetCurrentMinigame(minigame.title);
minigameList.SetCurrentMinigame(minigame.index);
SystemController.GetInstance().LoadNextScene("Common/Scenes/MinigameActivityScreen");
});
}