Bit of cleanup

This commit is contained in:
lvrossem
2023-03-02 17:13:57 +01:00
parent 0abf2096e8
commit 630c94836f
3 changed files with 4 additions and 47 deletions

View File

@@ -57,8 +57,7 @@ public class SpellingBeeController : MonoBehaviour {
timerValue -= Time.deltaTime;
if (timerValue <= 0.0f)
{
if (timerValue <= 0.0f) {
timerValue = 0.0f;
// Handle end of timer
}
@@ -69,6 +68,7 @@ public class SpellingBeeController : MonoBehaviour {
timerText.text = string.Format("{0:00}:{1:00}", minutes, seconds);
}
// Check if the correct char has been given as input
void checkChar(char letter) {
if (Char.ToUpper(letter) == Char.ToUpper(currentWord[currentIndex]) && input.text.Length == 1) {
letters[currentIndex].GetComponent<Image>().color = Color.green;
@@ -86,10 +86,12 @@ public class SpellingBeeController : MonoBehaviour {
}
}
// Adds seconds to timer
void addSeconds(int seconds) {
timerValue += (float) seconds;
}
// Find the chosen theme by its name
Theme findThemeByName(string themeName) {
int themeIndex = 0;