コード例 #1
0
        public HybrasylDialog NewDialog(string displayText, dynamic callback = null)
        {
            var dialog = new SimpleDialog(displayText);

            dialog.SetCallbackHandler(callback);
            return(new HybrasylDialog(dialog));
        }
コード例 #2
0
ファイル: HybrasylWorld.cs プロジェクト: moseleyc/server
        /// <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
ファイル: Scripting.cs プロジェクト: DomGrieco/server
 public HybrasylDialog NewDialog(String displayText, dynamic callback = null)
 {
     var dialog = new SimpleDialog(displayText);
     dialog.SetCallbackHandler(callback);
     return new HybrasylDialog(dialog);
 }