#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 SnxxzUIOSGiftModelWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.OSGiftModel); Utils.BeginObjectRegister(type, L, translator, 0, 13, 8, 2); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTime", _m_UpdateTime); Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsExist", _m_IsExist); Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGiftExist", _m_IsGiftExist); Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGiftBuy", _m_IsGiftBuy); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAreadyOpens", _m_SetAreadyOpens); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDefaultSelect", _m_GetDefaultSelect); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDayRemind", _m_SetDayRemind); Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStateUpate", _e_onStateUpate); Utils.RegisterFunc(L, Utils.METHOD_IDX, "onSelectUpdate", _e_onSelectUpdate); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsOpen", _g_get_IsOpen); Utils.RegisterFunc(L, Utils.GETTER_IDX, "priorityOpen", _g_get_priorityOpen); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsAdvance", _g_get_IsAdvance); Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectIndex", _g_get_selectIndex); Utils.RegisterFunc(L, Utils.GETTER_IDX, "jumpGiftId", _g_get_jumpGiftId); Utils.RegisterFunc(L, Utils.GETTER_IDX, "gifts", _g_get_gifts); Utils.RegisterFunc(L, Utils.GETTER_IDX, "alreadyOpens", _g_get_alreadyOpens); Utils.RegisterFunc(L, Utils.GETTER_IDX, "startSeconds", _g_get_startSeconds); Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectIndex", _s_set_selectIndex); Utils.RegisterFunc(L, Utils.SETTER_IDX, "jumpGiftId", _s_set_jumpGiftId); 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.OSGiftModel gen_ret = new Snxxz.UI.OSGiftModel(); 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.OSGiftModel constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Init( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_UnInit(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.UnInit( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_OnBeforePlayerDataInitialize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnBeforePlayerDataInitialize( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_OnPlayerLoginOk(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnPlayerLoginOk( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_UpdateTime(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { HAA16_tagMCSuperGiftInfo _package = (HAA16_tagMCSuperGiftInfo)translator.GetObject(L, 2, typeof(HAA16_tagMCSuperGiftInfo)); gen_to_be_invoked.UpdateTime( _package ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_IsExist(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { bool gen_ret = gen_to_be_invoked.IsExist( ); LuaAPI.lua_pushboolean(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_IsGiftExist(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { int __id = LuaAPI.xlua_tointeger(L, 2); bool gen_ret = gen_to_be_invoked.IsGiftExist( __id ); LuaAPI.lua_pushboolean(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_IsGiftBuy(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { int __id = LuaAPI.xlua_tointeger(L, 2); bool gen_ret = gen_to_be_invoked.IsGiftBuy( __id ); LuaAPI.lua_pushboolean(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_SetAreadyOpens(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.SetAreadyOpens( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetDefaultSelect(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { int gen_ret = gen_to_be_invoked.GetDefaultSelect( ); 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_SetDayRemind(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); { int _index = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.SetDayRemind( _index ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_IsOpen(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsOpen); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_priorityOpen(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.priorityOpen); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_IsAdvance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsAdvance); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_selectIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectIndex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_jumpGiftId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.jumpGiftId); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_gifts(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.gifts); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_alreadyOpens(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.alreadyOpens); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_startSeconds(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushuint(L, gen_to_be_invoked.startSeconds); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_selectIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.selectIndex = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_jumpGiftId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.jumpGiftId = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_onStateUpate(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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.onStateUpate += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.onStateUpate -= 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.OSGiftModel.onStateUpate!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_onSelectUpdate(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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.onSelectUpdate += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.onSelectUpdate -= 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.OSGiftModel.onSelectUpdate!"); return 0; } } }