Esempio n. 1
0
        static int LoadText_Lua(IntPtr L)
        {
            var encrypted = false;

            if (Api.lua_gettop(L) == 2)
            {
                if (Api.lua_type(L, 2) == Api.LUA_TBOOLEAN)
                {
                    encrypted = Api.lua_toboolean(L, 2);
                }
            }
            var text = ResMgr.LoadText(Api.lua_tostring(L, 1), encrypted);

            if (text == null)
            {
                return(0);
            }
            Api.lua_pushstring(L, text);
            return(1);
        }