#if USE_UNI_LUA using LuaAPI = UniLua.Lua; using RealStatePtr = UniLua.ILuaState; using LuaCSFunction = UniLua.CSharpFunctionDelegate; #else using LuaAPI = XLua.LuaDLL.Lua; using RealStatePtr = System.IntPtr; using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; #endif using XLua; using System.Collections.Generic; namespace XLua.CSObjectWrap { using Utils = XLua.Utils; public class SnxxzUIFashionDecomposeModelWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.FashionDecomposeModel); Utils.BeginObjectRegister(type, L, translator, 0, 7, 2, 1); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDecomposeItem", _m_GetDecomposeItem); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateDecomposeItem", _m_UpdateDecomposeItem); Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetDecomposeItem", _m_TryGetDecomposeItem); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSumDecomposeExp", _m_GetSumDecomposeExp); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSelectItemlist", _m_GetSelectItemlist); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendDecomposeFashion", _m_SendDecomposeFashion); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateDecomposeExpEvent", _e_UpdateDecomposeExpEvent); Utils.RegisterFunc(L, Utils.GETTER_IDX, "decomposeItemGuids", _g_get_decomposeItemGuids); Utils.RegisterFunc(L, Utils.GETTER_IDX, "decomposeItemDict", _g_get_decomposeItemDict); Utils.RegisterFunc(L, Utils.SETTER_IDX, "decomposeItemDict", _s_set_decomposeItemDict); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if(LuaAPI.lua_gettop(L) == 1) { Snxxz.UI.FashionDecomposeModel gen_ret = new Snxxz.UI.FashionDecomposeModel(); translator.Push(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.FashionDecomposeModel constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetDecomposeItem(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.GetDecomposeItem( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_UpdateDecomposeItem(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); { string _guid = LuaAPI.lua_tostring(L, 2); bool __isSelect = LuaAPI.lua_toboolean(L, 3); gen_to_be_invoked.UpdateDecomposeItem( _guid, __isSelect ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_TryGetDecomposeItem(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); { string _guid = LuaAPI.lua_tostring(L, 2); Snxxz.UI.FashionDecomposeModel.DecomposeItem _decomposeItem; bool gen_ret = gen_to_be_invoked.TryGetDecomposeItem( _guid, out _decomposeItem ); LuaAPI.lua_pushboolean(L, gen_ret); translator.Push(L, _decomposeItem); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetSumDecomposeExp(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); { int gen_ret = gen_to_be_invoked.GetSumDecomposeExp( ); LuaAPI.xlua_pushinteger(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetSelectItemlist(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); { System.Collections.Generic.List _indexs; System.Collections.Generic.List _ids; gen_to_be_invoked.GetSelectItemlist( out _indexs, out _ids ); translator.Push(L, _indexs); translator.Push(L, _ids); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SendDecomposeFashion(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.SendDecomposeFashion( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_decomposeItemGuids(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.decomposeItemGuids); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_decomposeItemDict(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.decomposeItemDict); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_decomposeItemDict(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.decomposeItemDict = (System.Collections.Generic.Dictionary)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_UpdateDecomposeExpEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.FashionDecomposeModel gen_to_be_invoked = (Snxxz.UI.FashionDecomposeModel)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(L, 3); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#3 need System.Action!"); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.UpdateDecomposeExpEvent += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.UpdateDecomposeExpEvent -= gen_delegate; return 0; } } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.FashionDecomposeModel.UpdateDecomposeExpEvent!"); return 0; } } }