#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 SnxxzUIRedpointCenterWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.RedpointCenter); Utils.BeginObjectRegister(type, L, translator, 0, 7, 0, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetAllRedpointState", _m_ResetAllRedpointState); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Register", _m_Register); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Report", _m_Report); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReportWithoutParent", _m_ReportWithoutParent); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRedpointState", _m_GetRedpointState); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRedpointCount", _m_GetRedpointCount); Utils.RegisterFunc(L, Utils.METHOD_IDX, "redpointValueChangeEvent", _e_redpointValueChangeEvent); 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) { Snxxz.UI.RedpointCenter gen_ret = new Snxxz.UI.RedpointCenter(); 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 Snxxz.UI.RedpointCenter constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ResetAllRedpointState(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.RedpointCenter gen_to_be_invoked = (Snxxz.UI.RedpointCenter)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.ResetAllRedpointState( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Register(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.RedpointCenter gen_to_be_invoked = (Snxxz.UI.RedpointCenter)translator.FastGetCSObj(L, 1); { Snxxz.UI.Redpoint __redpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint)); gen_to_be_invoked.Register( __redpoint ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Report(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.RedpointCenter gen_to_be_invoked = (Snxxz.UI.RedpointCenter)translator.FastGetCSObj(L, 1); { Snxxz.UI.Redpoint __redpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint)); gen_to_be_invoked.Report( __redpoint ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ReportWithoutParent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.RedpointCenter gen_to_be_invoked = (Snxxz.UI.RedpointCenter)translator.FastGetCSObj(L, 1); { Snxxz.UI.Redpoint __redpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint)); gen_to_be_invoked.ReportWithoutParent( __redpoint ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetRedpointState(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.RedpointCenter gen_to_be_invoked = (Snxxz.UI.RedpointCenter)translator.FastGetCSObj(L, 1); { int __id = LuaAPI.xlua_tointeger(L, 2); RedPointState gen_ret = gen_to_be_invoked.GetRedpointState( __id ); 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_GetRedpointCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.RedpointCenter gen_to_be_invoked = (Snxxz.UI.RedpointCenter)translator.FastGetCSObj(L, 1); { int __id = LuaAPI.xlua_tointeger(L, 2); int gen_ret = gen_to_be_invoked.GetRedpointCount( __id ); 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 _e_redpointValueChangeEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.RedpointCenter gen_to_be_invoked = (Snxxz.UI.RedpointCenter)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate>(L, 3); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#3 need System.Action!"); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.redpointValueChangeEvent += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.redpointValueChangeEvent -= 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 Snxxz.UI.RedpointCenter.redpointValueChangeEvent!"); return 0; } } }