/// <summary> /// Add a function that can be called from the Lua script and pause execution /// causing LuaThread.Start to return. You can call LuaThread.Start again /// to continue executing the script /// </summary> /// <param name="name">name used to refer to the function in the script</param> /// <param name="func">the function</param> public void RegisterBlocking(string name, Delegate func) { Marshaller m = new Marshaller(func, Marshaller.FunctionType.BLOCKING); LuaDll.lua_register(luastate, name, m.InvokeFromLua); }
/// <summary> /// Add a function that can be called from the Lua script /// </summary> /// <param name="name">name used to refer to the function in the script</param> /// <param name="func">the function</param> public void Register(string name, Delegate func) { Marshaller m = new Marshaller(func); LuaDll.lua_register(luastate, name, m.InvokeFromLua); }