Bit of cleanup and comments

This commit is contained in:
lvrossem
2023-03-02 20:32:28 +01:00
parent 56f3d0c195
commit c195ee69b1
2 changed files with 3 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ public class SpellingBeeController : MonoBehaviour {
private bool gameOver; private bool gameOver;
// Amount of seconds user gets per letter of the current word // Amount of seconds user gets per letter of the current word
// Set to 1 for testing; should be increased later
private int secondsPerLetter = 1; private int secondsPerLetter = 1;
// Counter that keeps track of how many words have been spelled correctly // Counter that keeps track of how many words have been spelled correctly
@@ -66,6 +67,7 @@ public class SpellingBeeController : MonoBehaviour {
// We use -1 instead of 0 so SetRandomWord can simply increment it each time // We use -1 instead of 0 so SetRandomWord can simply increment it each time
spelledWords = -1; spelledWords = -1;
gameOver = false; gameOver = false;
input.text = "";
gameOverPanel.SetActive(false); gameOverPanel.SetActive(false);
replayButton.onClick.AddListener(() => Start()); replayButton.onClick.AddListener(() => Start());
@@ -124,6 +126,7 @@ public class SpellingBeeController : MonoBehaviour {
} }
} }
// Delete all letter objects
void DeleteWord() { void DeleteWord() {
for (int i = 0; i < currentWord.Length; i++) { for (int i = 0; i < currentWord.Length; i++) {
Destroy(letters[i]); Destroy(letters[i]);

View File

@@ -9,7 +9,6 @@ public class SpellingBeeThemeSelectionController : MonoBehaviour {
private int buttonWidth = 600; private int buttonWidth = 600;
private int canvasWidth = 1920; private int canvasWidth = 1920;
private int canvasHeight = 1080;
// Start is called before the first frame update // Start is called before the first frame update
void Start() { void Start() {