/// <summary>
 /// 根据现有数据创建控件
 /// </summary>
 /// <param name="parent">父控件</param>
 /// <param name="dialoguePoints">节点关系对象</param>
 private void CreateControlByData(IDialoguePointID parent, params DialoguePoint[] dialoguePoints)
 {
     foreach (DialoguePoint dialoguePoint in dialoguePoints)
     {
         DialogueValue dialogueValue = dialogueAnalysisData.GetDialoguePointByID(dialoguePoint.dialogueID);
         if (dialogueValue == null)
         {
             continue;
         }
         DialoguePointControl dialoguePointControl = AddNewChildNode(parent as ISelectedControl, dialogueValue, false);//添加一个子节点
         if (dialoguePoint.childDialoguePoints != null && dialoguePoint.childDialoguePoints.Length > 0)
         {
             CreateControlByData(dialoguePointControl, dialoguePoint.childDialoguePoints);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 通过对话id获取对话数据
 /// </summary>
 /// <param name="dialogueValueID">对话的id,可以通过对话条件获取,也可以使用确定好的id</param>
 /// <returns></returns>
 public DialogueValue SearchDialogueValueByID(int dialogueValueID)
 {
     return(dialogueAnalysisData.GetDialoguePointByID(dialogueValueID));
 }