Example #1
0
        internal void RegVar(string name, LuaDLL.LuaCSFunction get, LuaDLL.LuaCSFunction set)
        {
            IntPtr fget = IntPtr.Zero;
            IntPtr fset = IntPtr.Zero;

            if (get != null)
            {
                fget = Marshal.GetFunctionPointerForDelegate(get);
            }
            if (set != null)
            {
                fset = Marshal.GetFunctionPointerForDelegate(set);
            }
            LuaDLL.tolua_variable(L, name, fget, fset);
        }
Example #2
0
        public void RegFunction(string name, LuaDLL.LuaCSFunction func)
        {
            IntPtr fn = Marshal.GetFunctionPointerForDelegate(func);

            LuaDLL.tolua_function(L, name, fn);
        }