Exemplo n.º 1
0
        /// <summary>
        /// Registers function on global Lua state.
        /// </summary>
        /// <param name="functionName"></param>
        private void Register(Melua.LuaNativeFunction function)
        {
            // Keep a reference, so it's not garbage collected...?
            var func = new Melua.LuaNativeFunction(function);

            _functions.Add(func);
            Melua.lua_register(GL, function.Method.Name, func);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Registers function on global Lua state.
        /// </summary>
        /// <param name="function"></param>
        private void Register(Melua.LuaNativeFunction function)
        {
            var func = Melua.CreateFunctionReference(GL, function);

            Melua.lua_register(GL, function.Method.Name, func);
        }