示例#1
0
        /*
         * Gets an object from the Lua stack with the desired type, if it matches, otherwise
         * returns null.
         */
        internal object GetAsType(LuaState luaState, int stackPos, Type paramType)
        {
            var extractor = typeChecker.CheckLuaType(luaState, stackPos, paramType);

            return(extractor != null?extractor(luaState, stackPos) : null);
        }
示例#2
0
        /*
         * Gets an object from the Lua stack with the desired type, if it matches, otherwise
         * returns null.
         */
        internal object GetAsType(LuaState luaState, int stackPos, Type paramType)
        {
            var extractor = typeChecker.CheckLuaType(luaState, stackPos, paramType);

            return(extractor?.Invoke(luaState, stackPos));
        }