#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 StageManagerWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(StageManager);
|
Utils.BeginObjectRegister(type, L, translator, 0, 5, 8, 2);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoadCreateRoleStage", _m_LoadCreateRoleStage);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoadSelectRoleStage", _m_LoadSelectRoleStage);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoadLoginStage", _m_LoadLoginStage);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStartStageLoadingEvent", _e_onStartStageLoadingEvent);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "loadingProgressEvent", _e_loadingProgressEvent);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isServerPreparing", _g_get_isServerPreparing);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "StageType", _g_get_StageType);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CurrentStage", _g_get_CurrentStage);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentMapId", _g_get_currentMapId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentMapResId", _g_get_currentMapResId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "stageAssetName", _g_get_stageAssetName);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isLoading", _g_get_isLoading);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "onStageLoadFinish", _g_get_onStageLoadFinish);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "isServerPreparing", _s_set_isServerPreparing);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "onStageLoadFinish", _s_set_onStageLoadFinish);
|
|
|
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)
|
{
|
|
StageManager gen_ret = new StageManager();
|
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 StageManager constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_LoadCreateRoleStage(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.LoadCreateRoleStage( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_LoadSelectRoleStage(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.LoadSelectRoleStage( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_LoadLoginStage(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.LoadLoginStage( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_isServerPreparing(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isServerPreparing);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_StageType(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.StageType);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_CurrentStage(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.CurrentStage);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_currentMapId(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.currentMapId);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_currentMapResId(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.currentMapResId);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_stageAssetName(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.stageAssetName);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_isLoading(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isLoading);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_onStageLoadFinish(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.onStageLoadFinish);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_isServerPreparing(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.isServerPreparing = LuaAPI.lua_toboolean(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_onStageLoadFinish(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.onStageLoadFinish = translator.GetDelegate<UnityEngine.Events.UnityAction>(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_onStartStageLoadingEvent(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
StageManager gen_to_be_invoked = (StageManager)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.onStartStageLoadingEvent += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.onStartStageLoadingEvent -= 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 StageManager.onStartStageLoadingEvent!");
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_loadingProgressEvent(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
StageManager gen_to_be_invoked = (StageManager)translator.FastGetCSObj(L, 1);
|
System.Action<float> gen_delegate = translator.GetDelegate<System.Action<float>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<float>!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.loadingProgressEvent += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.loadingProgressEvent -= 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 StageManager.loadingProgressEvent!");
|
return 0;
|
}
|
|
|
|
}
|
}
|