using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 存储对话信息的类。 /// [System.Serializable] public class DialogueEntry { public string role; // 角色名称 public List dialogues; // 对话内容列表 public bool hasEvent; // 是否有事件触发 public string eventName; // 事件名称 public string eventRole; // 事件角色(如果有事件的话) public List eventChoices; // 事件选项(如果有事件的话) public int nextEntryIndex; // 下一个对话条目索引 } /// /// 对话数据类,用于存储多个对话条目。 /// [System.Serializable] public class DialogueData { public List entries; // 对话条目列表 public int currentEntryIndex; // 当前对话条目索引 public Dictionary eventJumpTable = new Dictionary(); // 事件跳转表 }