Bit of cleanup and comments
This commit is contained in:
@@ -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]);
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user