示例#1
0
文件: JistEngine.cs 项目: wwa171/Jist
        /// <summary>
        /// Loops through all types in the app domain and creates functions in
        /// the engine for methods that have a JavascriptFunction attribute.
        /// </summary>
        protected void CreateScriptFunctions()
        {
            JistPlugin.RequestExternalFunctions();

            lock (syncRoot)
                jsEngine.SetValue("alert", new Action <object>(Console.WriteLine));
        }
示例#2
0
文件: JistEngine.cs 项目: wwa171/Jist
 public JistEngine(JistPlugin parent)
 {
     this.providedPackages = new List <string>();
     this.plugin           = parent;
     this.scriptContainer  = new ScriptContainer(this);
     ServerApi.Hooks.GamePostInitialize.Register(plugin, Game_PostInitialize);
     PercentChanged += (sender, args) => ConsoleEx.WriteBar(args);
 }
示例#3
0
文件: JistEngine.cs 项目: Enerdy/Jist
		public JistEngine(JistPlugin parent)
		{
			this.providedPackages = new List<string>();
			this.plugin = parent;
			this.scriptContainer = new ScriptContainer(this);
            ServerApi.Hooks.GamePostInitialize.Register(plugin, Game_PostInitialize);
            PercentChanged += (sender, args) => ConsoleEx.WriteBar(args);
		}
示例#4
0
        public JistRestInterface(JistPlugin plugin)
        {
            this._plugin = plugin;

            TShockAPI.TShock.RestApi.Register(new Rests.SecureRestCommand("/_jist/v1/send", rest_send, "jist.rest.send"));
        }