#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 SpineSlotWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Spine.Slot); Utils.BeginObjectRegister(type, L, translator, 0, 4, 14, 11); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClampColor", _m_ClampColor); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClampSecondColor", _m_ClampSecondColor); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetToSetupPose", _m_SetToSetupPose); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToString", _m_ToString); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Data", _g_get_Data); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Bone", _g_get_Bone); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Skeleton", _g_get_Skeleton); Utils.RegisterFunc(L, Utils.GETTER_IDX, "R", _g_get_R); Utils.RegisterFunc(L, Utils.GETTER_IDX, "G", _g_get_G); Utils.RegisterFunc(L, Utils.GETTER_IDX, "B", _g_get_B); Utils.RegisterFunc(L, Utils.GETTER_IDX, "A", _g_get_A); Utils.RegisterFunc(L, Utils.GETTER_IDX, "R2", _g_get_R2); Utils.RegisterFunc(L, Utils.GETTER_IDX, "G2", _g_get_G2); Utils.RegisterFunc(L, Utils.GETTER_IDX, "B2", _g_get_B2); Utils.RegisterFunc(L, Utils.GETTER_IDX, "HasSecondColor", _g_get_HasSecondColor); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Attachment", _g_get_Attachment); Utils.RegisterFunc(L, Utils.GETTER_IDX, "SequenceIndex", _g_get_SequenceIndex); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Deform", _g_get_Deform); Utils.RegisterFunc(L, Utils.SETTER_IDX, "R", _s_set_R); Utils.RegisterFunc(L, Utils.SETTER_IDX, "G", _s_set_G); Utils.RegisterFunc(L, Utils.SETTER_IDX, "B", _s_set_B); Utils.RegisterFunc(L, Utils.SETTER_IDX, "A", _s_set_A); Utils.RegisterFunc(L, Utils.SETTER_IDX, "R2", _s_set_R2); Utils.RegisterFunc(L, Utils.SETTER_IDX, "G2", _s_set_G2); Utils.RegisterFunc(L, Utils.SETTER_IDX, "B2", _s_set_B2); Utils.RegisterFunc(L, Utils.SETTER_IDX, "HasSecondColor", _s_set_HasSecondColor); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Attachment", _s_set_Attachment); Utils.RegisterFunc(L, Utils.SETTER_IDX, "SequenceIndex", _s_set_SequenceIndex); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Deform", _s_set_Deform); 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) == 3 && translator.Assignable(L, 2) && translator.Assignable(L, 3)) { Spine.SlotData _data = (Spine.SlotData)translator.GetObject(L, 2, typeof(Spine.SlotData)); Spine.Bone _bone = (Spine.Bone)translator.GetObject(L, 3, typeof(Spine.Bone)); var gen_ret = new Spine.Slot(_data, _bone); translator.Push(L, gen_ret); return 1; } if(LuaAPI.lua_gettop(L) == 3 && translator.Assignable(L, 2) && translator.Assignable(L, 3)) { Spine.Slot _slot = (Spine.Slot)translator.GetObject(L, 2, typeof(Spine.Slot)); Spine.Bone _bone = (Spine.Bone)translator.GetObject(L, 3, typeof(Spine.Bone)); var gen_ret = new Spine.Slot(_slot, _bone); 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 Spine.Slot constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ClampColor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.ClampColor( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ClampSecondColor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.ClampSecondColor( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetToSetupPose(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.SetToSetupPose( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ToString(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.ToString( ); LuaAPI.lua_pushstring(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Data(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Data); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Bone(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Bone); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Skeleton(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Skeleton); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_R(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.R); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_G(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.G); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_B(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.B); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_A(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.A); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_R2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.R2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_G2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.G2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_B2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.B2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_HasSecondColor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.HasSecondColor); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Attachment(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Attachment); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_SequenceIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.SequenceIndex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Deform(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Deform); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_R(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.R = (float)LuaAPI.lua_tonumber(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_G(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.G = (float)LuaAPI.lua_tonumber(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_B(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.B = (float)LuaAPI.lua_tonumber(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_A(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.A = (float)LuaAPI.lua_tonumber(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_R2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.R2 = (float)LuaAPI.lua_tonumber(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_G2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.G2 = (float)LuaAPI.lua_tonumber(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_B2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.B2 = (float)LuaAPI.lua_tonumber(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_HasSecondColor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.HasSecondColor = 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_Attachment(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Attachment = (Spine.Attachment)translator.GetObject(L, 2, typeof(Spine.Attachment)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_SequenceIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.SequenceIndex = LuaAPI.xlua_tointeger(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_Deform(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Spine.Slot gen_to_be_invoked = (Spine.Slot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Deform = (Spine.ExposedList)translator.GetObject(L, 2, typeof(Spine.ExposedList)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }