Example #1
0
    IEnumerator ShowText()
    {
        UINama.GetComponent <UnityEngine.UI.Text>().text = nama;
        for (int i = 0; i < sentences.Length; i++)
        {
            btn.SetActive(false);
            currentText = sentences.Substring(0, i + 1);
            UISentences.GetComponent <UnityEngine.UI.Text>().text = currentText;
            yield return(new WaitForSeconds(delay));

            if (Input.GetMouseButton(0))
            {
                UISentences.GetComponent <UnityEngine.UI.Text>().text = sentences;
                break;
            }
        }
        showButton();
    }
Example #2
0
 public void UpdateText()
 {
     UISentences.GetComponent <UnityEngine.UI.Text>().text = sentences;
     //start coroutine the sentences
     //pop text misi
 }