#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 SnxxzUIOSGiftModelWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Snxxz.UI.OSGiftModel);
|
Utils.BeginObjectRegister(type, L, translator, 0, 11, 7, 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, "OnPlayerLoginOk", _m_OnPlayerLoginOk);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateTime", _m_UpdateTime);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckActivate", _m_CheckActivate);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGiftOverdue", _m_IsGiftOverdue);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGiftBuy", _m_IsGiftBuy);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDayRemind", _m_SetDayRemind);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStateUpate", _e_onStateUpate);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "timeLimitUpdate", _e_timeLimitUpdate);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "activate", _g_get_activate);
|
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, "timeOverdueGiftId", _g_get_timeOverdueGiftId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsAdvance", _g_get_IsAdvance);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "overDueTime", _g_get_overDueTime);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "OSGiftRedpoint", _g_get_OSGiftRedpoint);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "overDueTime", _s_set_overDueTime);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "OSGiftRedpoint", _s_set_OSGiftRedpoint);
|
|
|
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.OSGiftModel gen_ret = new Snxxz.UI.OSGiftModel();
|
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.OSGiftModel constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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_OnPlayerLoginOk(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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_UpdateTime(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
HAA16_tagMCSuperGiftInfo _package = (HAA16_tagMCSuperGiftInfo)translator.GetObject(L, 2, typeof(HAA16_tagMCSuperGiftInfo));
|
|
gen_to_be_invoked.UpdateTime( _package );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_CheckActivate(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
bool gen_ret = gen_to_be_invoked.CheckActivate( );
|
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_IsGiftOverdue(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int __id = LuaAPI.xlua_tointeger(L, 2);
|
|
bool gen_ret = gen_to_be_invoked.IsGiftOverdue( __id );
|
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_IsGiftBuy(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int __id = LuaAPI.xlua_tointeger(L, 2);
|
|
bool gen_ret = gen_to_be_invoked.IsGiftBuy( __id );
|
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_OnBeforePlayerDataInitialize(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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_SetDayRemind(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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_activate(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.activate);
|
} 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.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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_timeOverdueGiftId(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.timeOverdueGiftId);
|
} 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.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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 _g_get_overDueTime(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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_OSGiftRedpoint(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.OSGiftRedpoint);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_overDueTime(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
System.DateTime gen_value;translator.Get(L, 2, out gen_value);
|
gen_to_be_invoked.overDueTime = gen_value;
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_OSGiftRedpoint(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.OSGiftRedpoint = (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_onStateUpate(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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.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.OSGiftModel.onStateUpate!");
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_timeLimitUpdate(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.OSGiftModel gen_to_be_invoked = (Snxxz.UI.OSGiftModel)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.timeLimitUpdate += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.timeLimitUpdate -= 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.OSGiftModel.timeLimitUpdate!");
|
return 0;
|
}
|
|
|
|
}
|
}
|