少年修仙传客户端基础资源
client_Wu Xijin
2018-10-30 d0a0f4e224e138f84bc4373fe4e9cc2c96d6160c
4340 【前端】支持xlua方便IOS提审
2个文件已修改
48 ■■■■■ 已修改文件
Assets/Editor/ScriptTemplate/LuaConfigTemplate.txt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/XLua/Gen/SnxxzUIRewardPreviewGroupWrap.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/ScriptTemplate/LuaConfigTemplate.txt
@@ -25,7 +25,7 @@
        local key = contents[1]
        local subTable = {}
        #Read#
        #ClassName#Config[tostring(key)] = subTable
        Configs[tostring(key)] = subTable
    end
end
Assets/XLua/Gen/SnxxzUIRewardPreviewGroupWrap.cs
@@ -21,9 +21,10 @@
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(Snxxz.UI.RewardPreviewGroup);
            Utils.BeginObjectRegister(type, L, translator, 0, 2, 0, 0);
            Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Display", _m_Display);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "LuaDisplay", _m_LuaDisplay);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Hide", _m_Hide);
            
            
@@ -116,6 +117,49 @@
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_LuaDisplay(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.RewardPreviewGroup gen_to_be_invoked = (Snxxz.UI.RewardPreviewGroup)translator.FastGetCSObj(L, 1);
                int gen_param_count = LuaAPI.lua_gettop(L);
                if(gen_param_count == 2&& translator.Assignable<int[]>(L, 2))
                {
                    int[] _itemIds = (int[])translator.GetObject(L, 2, typeof(int[]));
                    gen_to_be_invoked.LuaDisplay( _itemIds );
                    return 0;
                }
                if(gen_param_count == 3&& translator.Assignable<int[]>(L, 2)&& translator.Assignable<int[]>(L, 3))
                {
                    int[] _itemIds = (int[])translator.GetObject(L, 2, typeof(int[]));
                    int[] _itemCounts = (int[])translator.GetObject(L, 3, typeof(int[]));
                    gen_to_be_invoked.LuaDisplay( _itemIds, _itemCounts );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.RewardPreviewGroup.LuaDisplay!");
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Hide(RealStatePtr L)
        {
            try {