#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 ConfigWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Config);
|
Utils.BeginObjectRegister(type, L, translator, 0, 9, 1, 0);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RegisterGlobalEvent", _m_RegisterGlobalEvent);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoadPriorBundleConfig", _m_LoadPriorBundleConfig);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PreLoadConfigs", _m_PreLoadConfigs);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Co_LoadConfigs", _m_Co_LoadConfigs);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SyncLoadConfigs", _m_SyncLoadConfigs);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AllCompleted", _m_AllCompleted);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetProgress", _m_GetProgress);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTaskCount", _m_GetTaskCount);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ConfigParsePostProcess", _m_ConfigParsePostProcess);
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "inited", _g_get_inited);
|
|
|
|
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)
|
{
|
|
Config gen_ret = new Config();
|
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 Config constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RegisterGlobalEvent(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.RegisterGlobalEvent( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_LoadPriorBundleConfig(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.LoadPriorBundleConfig( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_PreLoadConfigs(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.PreLoadConfigs( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Co_LoadConfigs(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
System.Collections.IEnumerator gen_ret = gen_to_be_invoked.Co_LoadConfigs( );
|
translator.PushAny(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_SyncLoadConfigs(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.SyncLoadConfigs( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_AllCompleted(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
bool gen_ret = gen_to_be_invoked.AllCompleted( );
|
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_GetProgress(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
float gen_ret = gen_to_be_invoked.GetProgress( );
|
LuaAPI.lua_pushnumber(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_GetTaskCount(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
int gen_ret = gen_to_be_invoked.GetTaskCount( );
|
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_ConfigParsePostProcess(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.ConfigParsePostProcess( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_inited(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Config gen_to_be_invoked = (Config)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.inited);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
|
|
|
|
}
|
}
|