/// <summary> /// Assoiciate this particular dialog with a sequence. /// </summary> /// <param name="sequence"></param> public void AssociateDialogWithSequence(DialogSequence sequence) { if (sequence is null) { GameLog.ScriptingError("AssociateDialogWithSequence: sequence (first argument) cannot be null"); return; } Sequence = sequence; sequence.AddDialog(Dialog); }
/// <summary> /// Create a new dialog sequence consisting of a bunch of simple text dialogs. /// </summary> /// <param name="sequenceName">The name of the constructed sequence.</param> /// <param name="textList">A string array of dialog lines that will be used to construct each dialog in the sequence.</param> /// <returns>The constructed dialog seqeunce</returns> public HybrasylDialogSequence NewSimpleDialogSequence(string sequenceName, params string[] textList) { var sequence = new DialogSequence(sequenceName); foreach (var entry in textList) { sequence.AddDialog(new SimpleDialog(entry)); } return(new HybrasylDialogSequence(sequence)); }
/// <summary> /// Create a new dialog sequence consisting of a bunch of simple text dialogs. /// </summary> /// <param name="sequenceName">The name of the constructed sequence.</param> /// <param name="textList">A string array of dialog lines that will be used to construct each dialog in the sequence.</param> /// <returns>The constructed dialog seqeunce</returns> public HybrasylDialogSequence NewSimpleDialogSequence(string sequenceName, params string[] textList) { if (string.IsNullOrEmpty(sequenceName)) { GameLog.ScriptingError($"NewSimpleDialogSequence: Sequence name (first argument) was null / empty"); return(null); } var sequence = new DialogSequence(sequenceName); foreach (var entry in textList) { if (string.IsNullOrEmpty(entry)) { GameLog.ScriptingWarning("NewSimpleDialogSequence: encountered empty / null dialog text, ignoring"); continue; } sequence.AddDialog(new SimpleDialog(entry)); } return(new HybrasylDialogSequence(sequence)); }
public void AssociateDialogWithSequence(DialogSequence sequence) { Sequence = sequence; sequence.AddDialog(Dialog); }
/// <summary> /// Assoiciate this particular dialog with a sequence. /// </summary> /// <param name="sequence"></param> public void AssociateDialogWithSequence(DialogSequence sequence) { Sequence = sequence; sequence.AddDialog(Dialog); }