public void ShowingScriptText() { if (typingAnimation.IsAnimating) { typingAnimation.CompleteImmediate(); return; } if (currentScriptIndex == scriptDatas.Length) { onScriptShowingCompleted.Invoke(); gameObject.SetActive(false); return; } nameText.text = scriptDatas[currentScriptIndex].talkerName; typingAnimation.StartAnimation(scriptDatas[currentScriptIndex].script); currentScriptIndex++; }
public void Show(string text) { typingAnimation.StopAnimation(); typingAnimation.StartAnimation(text); }