コード例 #1
0
    public void ShowDialog(string speaker, string content, WhichImage which = WhichImage.LeftImage)
    {
        characterAvatar.sprite = AvatarDict.ContainsKey(speaker) ? AvatarDict[speaker] : null;

        ShowTachie(speaker, which);

        string text = "<b>" + speaker + "</b>: ";

        dialogText.text = text;
        // dialogText.text = text;
        dialogPanel.SetActive(true);
        dialogTypewriter.SetText(content, true);
    }
コード例 #2
0
 void SkipOrNext()
 {
     if (typewriter.typing)
     {
         typewriter.Skip();
     }
     else
     {
         Debug.Log("Cur script index " + curScriptIndex);
         Debug.Log("Length: " + scripts.data.Length);
         if (curScriptIndex < scripts.data.Length)
         {
             Debug.Log(scripts.data[curScriptIndex]);
             typewriter.SetText(scripts.data[curScriptIndex], false);
             ++curScriptIndex;
         }
         else
         {
             GameManager.instance.SwitchScene("scene_3-1");
         }
     }
 }