#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 InSevenDaysConfigWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(InSevenDaysConfig);
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 10, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "RewardID", _g_get_RewardID);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Reward", _g_get_Reward);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ICON", _g_get_ICON);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "RewardName", _g_get_RewardName);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Image", _g_get_Image);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ImgTxt1", _g_get_ImgTxt1);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ImgTxt2", _g_get_ImgTxt2);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "DayIcon", _g_get_DayIcon);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Money", _g_get_Money);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsTitle", _g_get_IsTitle);
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 0);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeys", _m_GetKeys_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValues", _m_GetValues_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_);
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inited", _g_get_inited);
|
|
|
|
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)
|
{
|
|
InSevenDaysConfig gen_ret = new InSevenDaysConfig();
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
if(LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
{
|
string _input = LuaAPI.lua_tostring(L, 2);
|
|
InSevenDaysConfig gen_ret = new InSevenDaysConfig(_input);
|
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 InSevenDaysConfig constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Get_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 1);
|
|
InSevenDaysConfig gen_ret = InSevenDaysConfig.Get( _id );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
{
|
string _id = LuaAPI.lua_tostring(L, 1);
|
|
InSevenDaysConfig gen_ret = InSevenDaysConfig.Get( _id );
|
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 InSevenDaysConfig.Get!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetKeys_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
System.Collections.Generic.List<string> gen_ret = InSevenDaysConfig.GetKeys( );
|
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_GetValues_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
{
|
|
System.Collections.Generic.List<InSevenDaysConfig> gen_ret = InSevenDaysConfig.GetValues( );
|
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_Has_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 1);
|
|
bool gen_ret = InSevenDaysConfig.Has( _id );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
{
|
string _id = LuaAPI.lua_tostring(L, 1);
|
|
bool gen_ret = InSevenDaysConfig.Has( _id );
|
LuaAPI.lua_pushboolean(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 InSevenDaysConfig.Has!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init_xlua_st_(RealStatePtr L)
|
{
|
try {
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1))
|
{
|
bool _sync = LuaAPI.lua_toboolean(L, 1);
|
|
InSevenDaysConfig.Init( _sync );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 0)
|
{
|
|
InSevenDaysConfig.Init( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to InSevenDaysConfig.Init!");
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_inited(RealStatePtr L)
|
{
|
try {
|
|
LuaAPI.lua_pushboolean(L, InSevenDaysConfig.inited);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_RewardID(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.RewardID);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Reward(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Reward);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_ICON(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.ICON);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_RewardName(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.RewardName);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Image(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Image);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_ImgTxt1(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.ImgTxt1);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_ImgTxt2(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.ImgTxt2);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_DayIcon(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.DayIcon);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_Money(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Money);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_IsTitle(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
InSevenDaysConfig gen_to_be_invoked = (InSevenDaysConfig)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.IsTitle);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
|
|
|
|
}
|
}
|