예제 #1
0
    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++;
    }
예제 #2
0
 public void Show(string text)
 {
     typingAnimation.StopAnimation();
     typingAnimation.StartAnimation(text);
 }