#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 SnxxzUIBossHomeModelWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.BossHomeModel); Utils.BeginObjectRegister(type, L, translator, 0, 9, 2, 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, "TryGetBossHomeData", _m_TryGetBossHomeData); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRecommendFloor", _m_GetRecommendFloor); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetFloorVipRequirement", _m_GetFloorVipRequirement); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetVipLackCost", _m_GetVipLackCost); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnMapInitOk", _m_OnMapInitOk); Utils.RegisterFunc(L, Utils.METHOD_IDX, "bossHomeFloorSelectedEvent", _e_bossHomeFloorSelectedEvent); Utils.RegisterFunc(L, Utils.METHOD_IDX, "bossSelectedEvent", _e_bossSelectedEvent); Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedFloor", _g_get_selectedFloor); Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedBoss", _g_get_selectedBoss); Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedFloor", _s_set_selectedFloor); Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedBoss", _s_set_selectedBoss); 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, "BOSSHOME_MAPID", Snxxz.UI.BossHomeModel.BOSSHOME_MAPID); 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.BossHomeModel gen_ret = new Snxxz.UI.BossHomeModel(); 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.BossHomeModel constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)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.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)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_TryGetBossHomeData(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); { int __layer = LuaAPI.xlua_tointeger(L, 2); Snxxz.UI.BossHomeData __data; bool gen_ret = gen_to_be_invoked.TryGetBossHomeData( __layer, out __data ); LuaAPI.lua_pushboolean(L, gen_ret); translator.Push(L, __data); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetRecommendFloor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); { int gen_ret = gen_to_be_invoked.GetRecommendFloor( ); 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_GetFloorVipRequirement(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); { int __floor = LuaAPI.xlua_tointeger(L, 2); int gen_ret = gen_to_be_invoked.GetFloorVipRequirement( __floor ); 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_GetVipLackCost(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); { int __floor = LuaAPI.xlua_tointeger(L, 2); int gen_ret = gen_to_be_invoked.GetVipLackCost( __floor ); 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_OnMapInitOk(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnMapInitOk( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_selectedFloor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectedFloor); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_selectedBoss(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectedBoss); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_selectedFloor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.selectedFloor = 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_selectedBoss(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.selectedBoss = 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_bossHomeFloorSelectedEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)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.bossHomeFloorSelectedEvent += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.bossHomeFloorSelectedEvent -= 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.BossHomeModel.bossHomeFloorSelectedEvent!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_bossSelectedEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)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.bossSelectedEvent += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.bossSelectedEvent -= 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.BossHomeModel.bossSelectedEvent!"); return 0; } } }