#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 SnxxzUIPreciousItemGetModelWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Snxxz.UI.PreciousItemGetModel);
|
Utils.BeginObjectRegister(type, L, translator, 0, 10, 2, 1);
|
|
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, "OnSwitchAccount", _m_OnSwitchAccount);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetItem", _m_TryGetItem);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReportConfirmPreciousItem", _m_ReportConfirmPreciousItem);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetShowItemId", _m_GetShowItemId);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowPreciousItemAble", _m_ShowPreciousItemAble);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "showItemRefreshEvent", _e_showItemRefreshEvent);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentShowItem", _g_get_currentShowItem);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isGetNewItem", _g_get_isGetNewItem);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "isGetNewItem", _s_set_isGetNewItem);
|
|
|
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.PreciousItemGetModel gen_ret = new Snxxz.UI.PreciousItemGetModel();
|
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.PreciousItemGetModel constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)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.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)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.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)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_OnSwitchAccount(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.OnSwitchAccount( );
|
|
|
|
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.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)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_TryGetItem(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
string __guid = LuaAPI.lua_tostring(L, 2);
|
Snxxz.UI.PreciousItemGetModel.PreciousItem __itemModel;
|
|
bool gen_ret = gen_to_be_invoked.TryGetItem( __guid, out __itemModel );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
translator.Push(L, __itemModel);
|
|
|
|
|
return 2;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_ReportConfirmPreciousItem(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
Snxxz.UI.PreciousItemGetModel.PreciousItem __preciousItem;translator.Get(L, 2, out __preciousItem);
|
|
gen_to_be_invoked.ReportConfirmPreciousItem( __preciousItem );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetShowItemId(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
int gen_ret = gen_to_be_invoked.GetShowItemId( );
|
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_ShowPreciousItemAble(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
bool gen_ret = gen_to_be_invoked.ShowPreciousItemAble( );
|
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 _g_get_currentShowItem(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.currentShowItem);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_isGetNewItem(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isGetNewItem);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_isGetNewItem(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.isGetNewItem = LuaAPI.lua_toboolean(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_showItemRefreshEvent(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.PreciousItemGetModel gen_to_be_invoked = (Snxxz.UI.PreciousItemGetModel)translator.FastGetCSObj(L, 1);
|
System.Action gen_delegate = translator.GetDelegate<System.Action>(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.showItemRefreshEvent += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.showItemRefreshEvent -= 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.PreciousItemGetModel.showItemRefreshEvent!");
|
return 0;
|
}
|
|
|
|
}
|
}
|