#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 SnxxzUIAllianceBossModelWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.AllianceBossModel); Utils.BeginObjectRegister(type, L, translator, 0, 6, 3, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReceivePackage", _m_ReceivePackage); Utils.RegisterFunc(L, Utils.METHOD_IDX, "allianceBossStateRefresh", _e_allianceBossStateRefresh); Utils.RegisterFunc(L, Utils.GETTER_IDX, "isActivityOver", _g_get_isActivityOver); Utils.RegisterFunc(L, Utils.GETTER_IDX, "participateLimit", _g_get_participateLimit); Utils.RegisterFunc(L, Utils.GETTER_IDX, "inspireRewards", _g_get_inspireRewards); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 2, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DATAMAPID", Snxxz.UI.AllianceBossModel.DATAMAPID); 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.AllianceBossModel gen_ret = new Snxxz.UI.AllianceBossModel(); 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.AllianceBossModel constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)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_OnBeforePlayerDataInitialize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)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.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)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_UnInit(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)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_ReceivePackage(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)translator.FastGetCSObj(L, 1); { HA40C_tagGCAllFamilyBossInfo _package = (HA40C_tagGCAllFamilyBossInfo)translator.GetObject(L, 2, typeof(HA40C_tagGCAllFamilyBossInfo)); gen_to_be_invoked.ReceivePackage( _package ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_isActivityOver(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isActivityOver); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_participateLimit(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.participateLimit); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_inspireRewards(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.inspireRewards); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_allianceBossStateRefresh(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.AllianceBossModel gen_to_be_invoked = (Snxxz.UI.AllianceBossModel)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.allianceBossStateRefresh += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.allianceBossStateRefresh -= 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.AllianceBossModel.allianceBossStateRefresh!"); return 0; } } }