#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 SnxxzUIPersonalBossModelWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Snxxz.UI.PersonalBossModel);
|
Utils.BeginObjectRegister(type, L, translator, 0, 10, 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, "RequestSetDungeonAction", _m_RequestSetDungeonAction);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetBossData", _m_TryGetBossData);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPersonalBosses", _m_GetPersonalBosses);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsBossUnLocked", _m_IsBossUnLocked);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetLatestUnLockBoss", _m_GetLatestUnLockBoss);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateRedpoint", _m_UpdateRedpoint);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnMapInitOk", _m_OnMapInitOk);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "bossSelectedEvent", _e_bossSelectedEvent);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedBoss", _g_get_selectedBoss);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "personalRedpoint", _g_get_personalRedpoint);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedBoss", _s_set_selectedBoss);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "personalRedpoint", _s_set_personalRedpoint);
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 3, 0, 0);
|
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PERSONALBOSS_MAPID", Snxxz.UI.PersonalBossModel.PERSONALBOSS_MAPID);
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "PERSONAL_REDPOINTID", Snxxz.UI.PersonalBossModel.PERSONAL_REDPOINTID);
|
|
|
|
|
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.PersonalBossModel gen_ret = new Snxxz.UI.PersonalBossModel();
|
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.PersonalBossModel constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)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.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)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_RequestSetDungeonAction(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.RequestSetDungeonAction( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_TryGetBossData(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int __bossId = LuaAPI.xlua_tointeger(L, 2);
|
Snxxz.UI.PersonalBossData __data;
|
|
bool gen_ret = gen_to_be_invoked.TryGetBossData( __bossId, 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_GetPersonalBosses(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
System.Collections.Generic.List<int> gen_ret = gen_to_be_invoked.GetPersonalBosses( );
|
translator.Push(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_IsBossUnLocked(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int __bossId = LuaAPI.xlua_tointeger(L, 2);
|
|
bool gen_ret = gen_to_be_invoked.IsBossUnLocked( __bossId );
|
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_GetLatestUnLockBoss(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
int gen_ret = gen_to_be_invoked.GetLatestUnLockBoss( );
|
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_UpdateRedpoint(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.UpdateRedpoint( );
|
|
|
|
return 0;
|
}
|
|
} 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.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)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_selectedBoss(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)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 _g_get_personalRedpoint(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.personalRedpoint);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_selectedBoss(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)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 _s_set_personalRedpoint(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.personalRedpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint));
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
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.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
|
System.Action<int> gen_delegate = translator.GetDelegate<System.Action<int>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<int>!");
|
}
|
|
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.PersonalBossModel.bossSelectedEvent!");
|
return 0;
|
}
|
|
|
|
}
|
}
|