Resolve WES-99 "Cc refactor"

This commit is contained in:
Dries Van Schuylenbergh
2023-03-14 10:56:42 +00:00
parent 59d69f7412
commit dfc69ddd76
57 changed files with 733 additions and 1116 deletions

View File

@@ -330,11 +330,12 @@ public class GameController : MonoBehaviour
if (correctLetters + incorrectLetters > 0)
{
accuracyText.text = ((correctLetters) * 100f / (correctLetters + incorrectLetters)).ToString("#.##") + "%";
} else
}
else
{
accuracyText.text = "-";
}
// Words
wordsText.text = spelledWords.ToString();

View File

@@ -1,10 +1,11 @@
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
/// <summary>
/// Class to manage all webcam stuff inside the SpellingBee minigame
/// </summary>
public class SpellingBeeWebcam : MonoBehaviour
{
{
/// <summary>
/// Index of the current camera
/// </summary>
@@ -21,12 +22,7 @@ public class SpellingBeeWebcam : MonoBehaviour
public RawImage display;
/// <summary>
/// For later use
/// </summary>
public TextMeshProUGUI dynamic;
/// <summary>
/// Initialize the camera view
/// Setup the webcam correctly
/// </summary>
void Awake()
{
@@ -38,7 +34,7 @@ public class SpellingBeeWebcam : MonoBehaviour
}
/// <summary>
/// Switch to a different webcam
/// Swap webcam by cycling through the `WebCamTexture.devices` list
/// </summary>
public void SwapCam()
{
@@ -65,12 +61,12 @@ public class SpellingBeeWebcam : MonoBehaviour
/// <summary>
/// Scene changing is implemented here to avoid problems with webcam
/// </summary>
public void LoadScene(string sceneName)
public void GotoThemeSelection()
{
display.texture = null;
tex.Stop();
tex = null;
SceneManager.LoadScene(sceneName);
SystemController.GetInstance().BackToPreviousScene();
}
}