First of all, I want to apologize for the horribly named title. Basically, what I want to do is look at a text, for example it could say あ, and I want to have the player input something and the computer checks if it is right. Here’s what I changed it to.
if (randomizedText.text == hir [0]) {
if (rom [0].Equals (hirToRomDictionary [hir [0]])) {
NextText ();
array.RemoveAt (temp);
attempts = 0;
} else {
attempts++;
if (attempts == 2) {
Debug.Log ("three times");
attempts = 0;
}
}
}
and
public void NextText(){
temp = UnityEngine.Random.Range (0, array.Count);
randomizedText.text = array [temp];
}
I have a bunch other but this is just one example. However, when the player gets it wrong, it still says it’s right. Why?