#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 SnxxzUIOSTimeLimitGiftModelWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.OSTimeLimitGiftModel); Utils.BeginObjectRegister(type, L, translator, 0, 7, 7, 0); 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, "TryGetGifts", _m_TryGetGifts); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDayRemind", _m_SetDayRemind); Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStateUpate", _e_onStateUpate); Utils.RegisterFunc(L, Utils.GETTER_IDX, "overdueTime", _g_get_overdueTime); Utils.RegisterFunc(L, Utils.GETTER_IDX, "openDays", _g_get_openDays); Utils.RegisterFunc(L, Utils.GETTER_IDX, "redpoint", _g_get_redpoint); 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, "currentDay", _g_get_currentDay); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsAdvance", _g_get_IsAdvance); 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.OSTimeLimitGiftModel gen_ret = new Snxxz.UI.OSTimeLimitGiftModel(); 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.OSTimeLimitGiftModel constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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_TryGetGifts(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)translator.FastGetCSObj(L, 1); { int __day = LuaAPI.xlua_tointeger(L, 2); System.Collections.Generic.List __list; bool gen_ret = gen_to_be_invoked.TryGetGifts( __day, out __list ); LuaAPI.lua_pushboolean(L, gen_ret); translator.Push(L, __list); return 2; } } 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.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.SetDayRemind( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_overdueTime(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.overdueTime); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_openDays(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.openDays); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_redpoint(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.redpoint); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_IsOpen(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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_currentDay(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.currentDay); } 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.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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 _e_onStateUpate(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.OSTimeLimitGiftModel gen_to_be_invoked = (Snxxz.UI.OSTimeLimitGiftModel)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.OSTimeLimitGiftModel.onStateUpate!"); return 0; } } }