#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 SnxxzUIKnapsackTimeCDMgrWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Snxxz.UI.KnapsackTimeCDMgr);
|
Utils.BeginObjectRegister(type, L, translator, 0, 9, 0, 0);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Register", _m_Register);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnRegister", _m_UnRegister);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemCoolById", _m_GetItemCoolById);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetNormalCDTime", _m_GetNormalCDTime);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemCoolByCDType", _m_GetItemCoolByCDType);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefresCoolTimeAct", _e_RefresCoolTimeAct);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshItemOverdueTimeAct", _e_RefreshItemOverdueTimeAct);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshItemOverdueAct", _e_RefreshItemOverdueAct);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshNormalCDAct", _e_RefreshNormalCDAct);
|
|
|
|
|
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.KnapsackTimeCDMgr gen_ret = new Snxxz.UI.KnapsackTimeCDMgr();
|
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.KnapsackTimeCDMgr constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Register(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
|
{
|
int _code = LuaAPI.xlua_tointeger(L, 2);
|
double _cdTime = LuaAPI.lua_tonumber(L, 3);
|
|
gen_to_be_invoked.Register( _code, _cdTime );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
|
{
|
string _guid = LuaAPI.lua_tostring(L, 2);
|
int _itemId = LuaAPI.xlua_tointeger(L, 3);
|
double _cdTime = LuaAPI.lua_tonumber(L, 4);
|
|
gen_to_be_invoked.Register( _guid, _itemId, _cdTime );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.KnapsackTimeCDMgr.Register!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_UnRegister(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
|
{
|
int _code = LuaAPI.xlua_tointeger(L, 2);
|
|
gen_to_be_invoked.UnRegister( _code );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
{
|
string _guid = LuaAPI.lua_tostring(L, 2);
|
|
gen_to_be_invoked.UnRegister( _guid );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.KnapsackTimeCDMgr.UnRegister!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetItemCoolById(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
string _guid = LuaAPI.lua_tostring(L, 2);
|
|
Snxxz.UI.ItemCDCool gen_ret = gen_to_be_invoked.GetItemCoolById( _guid );
|
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_GetNormalCDTime(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _code = LuaAPI.xlua_tointeger(L, 2);
|
|
int gen_ret = gen_to_be_invoked.GetNormalCDTime( _code );
|
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_GetItemCoolByCDType(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _type = LuaAPI.xlua_tointeger(L, 2);
|
bool _isCool;
|
|
System.Collections.Generic.List<Snxxz.UI.ItemCDCool> gen_ret = gen_to_be_invoked.GetItemCoolByCDType( _type, out _isCool );
|
translator.Push(L, gen_ret);
|
LuaAPI.lua_pushboolean(L, _isCool);
|
|
|
|
|
return 2;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_RefresCoolTimeAct(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
System.Action<string> gen_delegate = translator.GetDelegate<System.Action<string>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<string>!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.RefresCoolTimeAct += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.RefresCoolTimeAct -= 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.KnapsackTimeCDMgr.RefresCoolTimeAct!");
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_RefreshItemOverdueTimeAct(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
System.Action<string> gen_delegate = translator.GetDelegate<System.Action<string>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<string>!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.RefreshItemOverdueTimeAct += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.RefreshItemOverdueTimeAct -= 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.KnapsackTimeCDMgr.RefreshItemOverdueTimeAct!");
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_RefreshItemOverdueAct(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
System.Action<string> gen_delegate = translator.GetDelegate<System.Action<string>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<string>!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.RefreshItemOverdueAct += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.RefreshItemOverdueAct -= 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.KnapsackTimeCDMgr.RefreshItemOverdueAct!");
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_RefreshNormalCDAct(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.KnapsackTimeCDMgr gen_to_be_invoked = (Snxxz.UI.KnapsackTimeCDMgr)translator.FastGetCSObj(L, 1);
|
System.Action<int, int> gen_delegate = translator.GetDelegate<System.Action<int, int>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<int, int>!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.RefreshNormalCDAct += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.RefreshNormalCDAct -= 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.KnapsackTimeCDMgr.RefreshNormalCDAct!");
|
return 0;
|
}
|
|
|
|
}
|
}
|