private void FishTalk(string keyWord, bool animateOrNot) { FishTalkButton.SetActive(true); currentFT = FishTextManager.GetText(keyWord); FishTalk(animateOrNot); }
private void FishTalk(bool animateOrNot) { int idx = currentFT.playingIdx; if (animateOrNot) { lastRoutine = StartCoroutine(AnimateText(fishText, currentFT.content[idx])); } else { //when last sentence if (currentFT.playingIdx > currentFT.content.Count - 2) { FishTalkButton.SetActive(false); currentFT.isPlaying = false; forwardOneStep = forwardLater; } fishText.text = currentFT.content[idx]; } Debug.Log("idx " + idx); Debug.Log("fishTalking " + currentFT.content[idx]); }