예제 #1
0
    private void SetDialogInfo(int dialogId)
    {
        var data = TableNPCNPCDialogScriptable.Get().GetData(dialogId);

        if (data != null)
        {
            Text_Dialog.text = data.content;
            TypewriterText.RestartRead();
            if (data.Speaker != "我")
            {
                Image_LeftSide.gameObject.SetActive(false);
                Image_RightSide.gameObject.SetActive(true);
                Image_RightSide.sprite = Sprte_speaker[1];
            }
            else
            {
                Image_LeftSide.gameObject.SetActive(true);
                Image_RightSide.gameObject.SetActive(false);
                Image_LeftSide.sprite = Sprte_speaker[0];
            }
        }
    }