#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 ChatBubbleBoxConfigWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(ChatBubbleBoxConfig); Utils.BeginObjectRegister(type, L, translator, 0, 0, 12, 0); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ID", _g_get_ID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Name", _g_get_Name); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NeedLV", _g_get_NeedLV); Utils.RegisterFunc(L, Utils.GETTER_IDX, "leftBubbleIcon", _g_get_leftBubbleIcon); Utils.RegisterFunc(L, Utils.GETTER_IDX, "rightBubbleIcon", _g_get_rightBubbleIcon); Utils.RegisterFunc(L, Utils.GETTER_IDX, "leftOffset", _g_get_leftOffset); Utils.RegisterFunc(L, Utils.GETTER_IDX, "rightOffset", _g_get_rightOffset); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Icon", _g_get_Icon); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Jump", _g_get_Jump); Utils.RegisterFunc(L, Utils.GETTER_IDX, "GainTip", _g_get_GainTip); Utils.RegisterFunc(L, Utils.GETTER_IDX, "color", _g_get_color); Utils.RegisterFunc(L, Utils.GETTER_IDX, "top", _g_get_top); 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) { ChatBubbleBoxConfig gen_ret = new ChatBubbleBoxConfig(); 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); ChatBubbleBoxConfig gen_ret = new ChatBubbleBoxConfig(_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 ChatBubbleBoxConfig 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); ChatBubbleBoxConfig gen_ret = ChatBubbleBoxConfig.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); ChatBubbleBoxConfig gen_ret = ChatBubbleBoxConfig.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 ChatBubbleBoxConfig.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 = ChatBubbleBoxConfig.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 = ChatBubbleBoxConfig.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 = ChatBubbleBoxConfig.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 = ChatBubbleBoxConfig.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 ChatBubbleBoxConfig.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); ChatBubbleBoxConfig.Init( _sync ); return 0; } if(gen_param_count == 0) { ChatBubbleBoxConfig.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 ChatBubbleBoxConfig.Init!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_inited(RealStatePtr L) { try { LuaAPI.lua_pushboolean(L, ChatBubbleBoxConfig.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); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)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_Name(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.Name); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_NeedLV(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NeedLV); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_leftBubbleIcon(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.leftBubbleIcon); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_rightBubbleIcon(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.rightBubbleIcon); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_leftOffset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.leftOffset); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_rightOffset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.rightOffset); } 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); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)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_Jump(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Jump); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_GainTip(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.GainTip); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_color(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.color); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_top(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ChatBubbleBoxConfig gen_to_be_invoked = (ChatBubbleBoxConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.top); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } } }