Demo day booth

This commit is contained in:
Dries Van Schuylenbergh
2023-04-23 18:50:07 +00:00
committed by Jelle De Geest
parent 5b4a3ec4e7
commit fcd8acad1e
248 changed files with 22351 additions and 7800 deletions

View File

@@ -519,7 +519,7 @@ public class HangmanController : AbstractFeedback
// The current sign was accepted, return to the game
mode = 2;
if (corrects == currentWord.Length)
if (corrects == currentWord.Replace(" ", "").Length)
{
// Victory, deactivate the model and show the scoreboard
ActivateWin();
@@ -625,7 +625,7 @@ public class HangmanController : AbstractFeedback
/// <param name="word">The word to display</param>
private void DisplayWord(string word)
{
for (int i = 0; i < word.Length; i++)
foreach (Char c in word)
{
// Create instance of prefab
GameObject instance = GameObject.Instantiate(letterPrefab, letterContainer);
@@ -635,7 +635,7 @@ public class HangmanController : AbstractFeedback
Image background = instance.GetComponent<Image>();
background.color = Color.clear;
TMP_Text txt = instance.GetComponentInChildren<TMP_Text>();
txt.text = Char.ToString('_');
txt.text = c == ' ' ? "" : Char.ToString('_');
}
}