Resolve WES-99 "Cc refactor"
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user