GetFunction() public static method

public static GetFunction ( IntPtr L, int reference ) : LuaFunction
L System.IntPtr
reference int
return LuaFunction
Esempio n. 1
0
        public static LuaFunction ToLuaFunction(IntPtr L, int stackPos)
        {
            stackPos = LuaDLL.abs_index(L, stackPos);
            LuaDLL.lua_pushvalue(L, stackPos);
            int reference = LuaDLL.toluaL_ref(L);

            return(LuaStatic.GetFunction(L, reference));
        }
Esempio n. 2
0
        public static LuaFunction ToLuaFunction(IntPtr L, int stackPos)
        {
            LuaTypes luaTypes = LuaDLL.lua_type(L, stackPos);

            if (luaTypes == LuaTypes.LUA_TNIL)
            {
                return(null);
            }

            LuaDLL.lua_pushvalue(L, stackPos);
            int reference = LuaDLL.toluaL_ref(L);

            return(LuaStatic.GetFunction(L, reference));
        }