Пример #1
0
 /// <summary>
 /// Add a dialog option which will fire a JumpDialog when selected by a player.
 /// </summary>
 /// <param name="option">The option text</param>
 /// <param name="nextDialog">The JumpDialog that will be used by this option</param>
 public void AddOption(string option, HybrasylDialog nextDialog)
 {
     if (nextDialog.DialogType == typeof(JumpDialog))
     {
         Options.Add(option, nextDialog);
     }
     else
     {
         GameLog.Error($"Dialog option {option}: unsupported dialog type {nextDialog.DialogType.Name}");
     }
 }
Пример #2
0
 /// <summary>
 /// Add a dialog option which will fire a JumpDialog when selected by a player.
 /// </summary>
 /// <param name="option">The option text</param>
 /// <param name="nextDialog">The JumpDialog that will be used by this option</param>
 public void AddOption(string option, HybrasylDialog nextDialog)
 {
     if (string.IsNullOrEmpty(option) || nextDialog is null)
     {
         GameLog.ScriptingError($"AddOption: for options set, option (first argument) or dialog (second argument) was null or empty");
     }
     if (nextDialog.DialogType == typeof(JumpDialog))
     {
         Options.Add(option, nextDialog);
     }
     else
     {
         GameLog.ScriptingError($"AddOption: Dialog option {option}: dialog must be JumpDialog, but was a {nextDialog.DialogType.Name}, ignored");
     }
 }
Пример #3
0
 public void AddDialog(HybrasylDialog scriptDialog)
 {
     scriptDialog.AssociateDialogWithSequence(Sequence);
 }