#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 ActorShowConfigWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(ActorShowConfig); Utils.BeginObjectRegister(type, L, translator, 0, 1, 24, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnConfigParseCompleted", _m_OnConfigParseCompleted); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ID", _g_get_ID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NpcID", _g_get_NpcID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "MapID", _g_get_MapID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "line", _g_get_line); Utils.RegisterFunc(L, Utils.GETTER_IDX, "showNpcs", _g_get_showNpcs); Utils.RegisterFunc(L, Utils.GETTER_IDX, "length", _g_get_length); Utils.RegisterFunc(L, Utils.GETTER_IDX, "showNameTime", _g_get_showNameTime); Utils.RegisterFunc(L, Utils.GETTER_IDX, "BindMissionID", _g_get_BindMissionID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "type", _g_get_type); Utils.RegisterFunc(L, Utils.GETTER_IDX, "scale", _g_get_scale); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NpcFace", _g_get_NpcFace); Utils.RegisterFunc(L, Utils.GETTER_IDX, "PosX", _g_get_PosX); Utils.RegisterFunc(L, Utils.GETTER_IDX, "PosY", _g_get_PosY); Utils.RegisterFunc(L, Utils.GETTER_IDX, "shadow", _g_get_shadow); Utils.RegisterFunc(L, Utils.GETTER_IDX, "effect", _g_get_effect); Utils.RegisterFunc(L, Utils.GETTER_IDX, "uieffect", _g_get_uieffect); Utils.RegisterFunc(L, Utils.GETTER_IDX, "mob", _g_get_mob); Utils.RegisterFunc(L, Utils.GETTER_IDX, "cam", _g_get_cam); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Height", _g_get_Height); Utils.RegisterFunc(L, Utils.GETTER_IDX, "DialogueTime", _g_get_DialogueTime); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Dialogue", _g_get_Dialogue); Utils.RegisterFunc(L, Utils.GETTER_IDX, "soundId", _g_get_soundId); Utils.RegisterFunc(L, Utils.GETTER_IDX, "soundTime", _g_get_soundTime); Utils.RegisterFunc(L, Utils.GETTER_IDX, "step", _g_get_step); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 8, 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_IDX, "GetActorShowModel", _m_GetActorShowModel_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetActoreShowConfigByMapIdAndLineId", _m_GetActoreShowConfigByMapIdAndLineId_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) { ActorShowConfig gen_ret = new ActorShowConfig(); 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); ActorShowConfig gen_ret = new ActorShowConfig(_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 ActorShowConfig 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); ActorShowConfig gen_ret = ActorShowConfig.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); ActorShowConfig gen_ret = ActorShowConfig.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 ActorShowConfig.Get!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetKeys_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { System.Collections.Generic.List gen_ret = ActorShowConfig.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 gen_ret = ActorShowConfig.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 = ActorShowConfig.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 = ActorShowConfig.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 ActorShowConfig.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); ActorShowConfig.Init( _sync ); return 0; } if(gen_param_count == 0) { ActorShowConfig.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 ActorShowConfig.Init!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_OnConfigParseCompleted(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnConfigParseCompleted( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetActorShowModel_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { int _mapID = LuaAPI.xlua_tointeger(L, 1); int _npcID = LuaAPI.xlua_tointeger(L, 2); ActorShowConfig _actorShowModel; bool gen_ret = ActorShowConfig.GetActorShowModel( _mapID, _npcID, out _actorShowModel ); LuaAPI.lua_pushboolean(L, gen_ret); translator.Push(L, _actorShowModel); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetActoreShowConfigByMapIdAndLineId_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { int _mapId = LuaAPI.xlua_tointeger(L, 1); int _lineId = LuaAPI.xlua_tointeger(L, 2); ActorShowConfig _config; bool gen_ret = ActorShowConfig.GetActoreShowConfigByMapIdAndLineId( _mapId, _lineId, out _config ); LuaAPI.lua_pushboolean(L, gen_ret); translator.Push(L, _config); return 2; } } 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 { LuaAPI.lua_pushboolean(L, ActorShowConfig.inited); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_NpcID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NpcID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_MapID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.MapID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_line(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.line); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_showNpcs(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.showNpcs); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_length(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.length); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_showNameTime(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.showNameTime); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_BindMissionID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.BindMissionID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_type(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.type); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_scale(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.scale); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_NpcFace(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.NpcFace); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_PosX(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.PosX); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_PosY(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.PosY); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_shadow(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.shadow); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_effect(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.effect); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_uieffect(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.uieffect); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_mob(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.mob); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_cam(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.cam); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Height(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Height); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_DialogueTime(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.DialogueTime); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Dialogue(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Dialogue); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_soundId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.soundId); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_soundTime(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.soundTime); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_step(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ActorShowConfig gen_to_be_invoked = (ActorShowConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.step); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } } }