public IDialogTree SelectDialog(History history, Intention intention) { if (intention == null) { DebugLog.Warn("Intention is null. Returning null."); return(null); } // Select a dialog tree YarnDialogTree dialogTree = SelectDialogYarn(history, intention, dialogue.allNodes.ToList()); if (dialogTree == null) { DebugLog.Warn("No Dialog Tree was created. Returning null."); } return(dialogTree); }
public IDialogTree SelectDialog(History history, Intention intention) { if (intention == null) { DebugLog.Warn("Intention is null. Returning null."); return(null); } // Get all nodes IEnumerable <string> allNodes = Dialogue.allNodes; // Select a dialog tree YarnDialogTree dialogTree = SelectDialogYarn(history, intention, allNodes.ToList()); if (dialogTree == null) { DebugLog.Warn("No Dialog Tree was created. Returning null. Given intention is " + intention.Name); } return(dialogTree); }
public IDialogTree SelectDialog(History history, Intention intention) { if (intention == null) { DebugLog.Warn("Intention is null. Returning null."); return(null); } // Get all nodes IEnumerable <string> allNodes = dialogue.allNodes; // Filter to only start nodes List <string> startNodes = GetNodesStartWith(allNodes, "Start."); // Select a dialog tree YarnDialogTree dialogTree = SelectDialogYarn(history, intention, startNodes); if (dialogTree == null) { DebugLog.Warn("No Dialog Tree was created. Returning null."); } return(dialogTree); }
public void SetDialogTree(IDialogTree dialogTree) { if (dialogTree == null) { DebugLog.Warn("Dialog Tree is null"); return; } if (dialogTree.Equals(this._dialogTree)) { Reset(); return; } if (dialogTree is YarnDialogTree) { this._dialogTree = (YarnDialogTree)dialogTree; Reset(); } else { DebugLog.Warn("Dialog Tree is not a YarnDialogTree. It is " + dialogTree); } }