public void onListenClick() { Debug.Log(listenJson.Count + " " + npcName); //scan json and add speaking lines to textLines list for (int i = 0; i < listenJson.Count; i++) { if (listenJson[i].name == npcName) { for (int j = 0; j < listenJson[i].dialogue.Count; j++) { textLines.Add(listenJson[i].dialogue[j]); Debug.Log(listenJson[i].dialogue[j]); } } } //scan json and add wordbank words to player history list for (int i = 0; i < listenJson.Count; i++) { if (listenJson[i].name == npcName) { Debug.Log(listenJson[i].wordBank.Count); for (int j = 0; j < listenJson[i].wordBank.Count; j++) { playerHistory.addWord(listenJson[i].wordBank[j]); } } } //resets to main listen/question screen endAtLine = textLines.Count - 1; currentLine = 0; screenText.text = textLines[currentLine]; isClicked = true; stopPlayerMovement = true; listenClick = true; questionClick = false; }