示例#1
0
        void OnStartDialog(NPC npc)
        {
            int[]          arrDialogID = npc.dialogID;
            DialogStruct[] dialogList  = new DialogStruct[arrDialogID.Length];
            for (int i = 0; i < arrDialogID.Length; ++i)
            {
                DialogData data = GameData.instance.GetDialogDataInID(arrDialogID[i]);
                if (data == null)
                {
                    Debug.LogError("NPC::OnStartDialog::Can't Load Dialog Data");
                }
                dialogList[i].Name   = npc.characterName;
                dialogList[i].Dialog = data.Dialog;
            }

            OnStartDialog(dialogList);
        }
示例#2
0
 void SetDialog(DialogStruct data)
 {
     m_nameText.text   = data.Name;
     m_dialogText.text = data.Dialog;
 }