Resolve WES-143 "Feedback courses"

This commit is contained in:
Helena Van Breugel
2023-04-04 18:24:17 +00:00
committed by Jerome Coudron
parent c20cd89c3a
commit c358ac59e4
115 changed files with 11331 additions and 1116 deletions

View File

@@ -1,3 +1,4 @@
using DigitalRuby.Tween;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -5,7 +6,6 @@ using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using DigitalRuby.Tween;
public partial class SpellingBeeController : AbstractFeedback
{
@@ -167,6 +167,8 @@ public partial class SpellingBeeController : AbstractFeedback
/// </summary>
protected string previousIncorrectSign = null;
public RawImage webcamScreen;
/// <summary>
/// Start is called before the first frame update
/// </summary>
@@ -174,9 +176,12 @@ public partial class SpellingBeeController : AbstractFeedback
{
StartController();
signPredictor.ChangeModel(ModelIndex.FINGERSPELLING);
// signPredictor.SwapScreen(webcamScreen);
// signPredictor.SetModel(currentTheme.modelIndex);
signPredictor.SetModel(ModelIndex.FINGERSPELLING);
AddSelfAsListener();
}
/// <summary>
/// Is called at the start of the scene AND when the game is replayed
/// </summary>
@@ -210,7 +215,7 @@ public partial class SpellingBeeController : AbstractFeedback
UserList.Save();
currentTheme = minigame.themeList.themes[minigame.themeList.currentThemeIndex];
//feedback.signPredictor.ChangeModel(currentTheme.modelIndex);
//feedback.signPredictor.SetModel(currentTheme.modelIndex);
words.AddRange(currentTheme.learnables);
ShuffleWords();
NextWord();
@@ -555,8 +560,10 @@ public partial class SpellingBeeController : AbstractFeedback
/// Function to get the current letter that needs to be signed
/// </summary>
/// <returns>the current letter that needs to be signed</returns>
public string GetSign(){
if (letterIndex<currentWord.Length){
public string GetSign()
{
if (letterIndex < currentWord.Length)
{
return currentWord[letterIndex].ToString().ToUpper();
}
return null;
@@ -565,7 +572,8 @@ public partial class SpellingBeeController : AbstractFeedback
/// Function to confirm your prediction and check if it is correct.
/// </summary>
/// <param name="sign"></param>
public void predictSign(string sign) {
public void predictSign(string sign)
{
bool successful = sign.ToUpper() == currentWord[letterIndex].ToString().ToUpper();
if (successful)
{