예제 #1
0
        public HybrasylDialog NewDialog(string displayText, dynamic callback = null)
        {
            var dialog = new SimpleDialog(displayText);

            dialog.SetCallbackHandler(callback);
            return(new HybrasylDialog(dialog));
        }
예제 #2
0
        /// <summary>
        /// Create a new "simple" (text-only) dialog.
        /// </summary>
        /// <param name="displayText">The text that the dialog will display to the player.</param>
        /// <param name="callback">A lua callback that can be associated with the dialog, and will be fired when the dialog is shown to a player.</param>
        /// <returns>The constructed dialog</returns>
        public HybrasylDialog NewDialog(string displayText, string callback = null)
        {
            if (string.IsNullOrEmpty(displayText))
            {
                GameLog.ScriptingError($"NewDialog: Sequence name (first argument) was null / empty");
                return(null);
            }

            var dialog = new SimpleDialog(displayText);

            dialog.SetCallbackHandler(callback);
            return(new HybrasylDialog(dialog));
        }
예제 #3
0
 public HybrasylDialog NewDialog(String displayText, dynamic callback = null)
 {
     var dialog = new SimpleDialog(displayText);
     dialog.SetCallbackHandler(callback);
     return new HybrasylDialog(dialog);
 }