#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 SettingMgrWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(SettingMgr);
|
Utils.BeginObjectRegister(type, L, translator, 0, 6, 3, 3);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetIsRecordData", _m_SetIsRecordData);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAccountSetStr", _m_SetAccountSetStr);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsHaveKey", _m_IsHaveKey);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAccountSetBoolInfo", _m_GetAccountSetBoolInfo);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAccountSetIntInfo", _m_GetAccountSetIntInfo);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAccountSetFloatInfo", _m_GetAccountSetFloatInfo);
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "accountKey", _g_get_accountKey);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "accountSetStr", _g_get_accountSetStr);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "LocalSaveOpenEvent", _g_get_LocalSaveOpenEvent);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "accountKey", _s_set_accountKey);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "accountSetStr", _s_set_accountSetStr);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "LocalSaveOpenEvent", _s_set_LocalSaveOpenEvent);
|
|
|
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)
|
{
|
|
SettingMgr gen_ret = new SettingMgr();
|
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 SettingMgr constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_SetIsRecordData(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
bool _isClear = LuaAPI.lua_toboolean(L, 3);
|
|
gen_to_be_invoked.SetIsRecordData( _key, _isClear );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
gen_to_be_invoked.SetIsRecordData( _key );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to SettingMgr.SetIsRecordData!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_SetAccountSetStr(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
string _value = LuaAPI.lua_tostring(L, 3);
|
|
gen_to_be_invoked.SetAccountSetStr( _key, _value );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_IsHaveKey(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
string _value = LuaAPI.lua_tostring(L, 3);
|
|
bool gen_ret = gen_to_be_invoked.IsHaveKey( _key, _value );
|
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_GetAccountSetBoolInfo(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
bool gen_ret = gen_to_be_invoked.GetAccountSetBoolInfo( _key );
|
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_GetAccountSetIntInfo(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
int gen_ret = gen_to_be_invoked.GetAccountSetIntInfo( _key );
|
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_GetAccountSetFloatInfo(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
float __default = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float gen_ret = gen_to_be_invoked.GetAccountSetFloatInfo( _key, __default );
|
LuaAPI.lua_pushnumber(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
{
|
string _key = LuaAPI.lua_tostring(L, 2);
|
|
float gen_ret = gen_to_be_invoked.GetAccountSetFloatInfo( _key );
|
LuaAPI.lua_pushnumber(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 SettingMgr.GetAccountSetFloatInfo!");
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_accountKey(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.accountKey);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_accountSetStr(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.accountSetStr);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_LocalSaveOpenEvent(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.LocalSaveOpenEvent);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_accountKey(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.accountKey = LuaAPI.lua_tostring(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_accountSetStr(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.accountSetStr = (System.Text.StringBuilder)translator.GetObject(L, 2, typeof(System.Text.StringBuilder));
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_LocalSaveOpenEvent(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
SettingMgr gen_to_be_invoked = (SettingMgr)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.LocalSaveOpenEvent = translator.GetDelegate<System.Action>(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
|
|
}
|
}
|