#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 UnityEngineClothSphereColliderPairWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UnityEngine.ClothSphereColliderPair); Utils.BeginObjectRegister(type, L, translator, 0, 0, 2, 2); Utils.RegisterFunc(L, Utils.GETTER_IDX, "first", _g_get_first); Utils.RegisterFunc(L, Utils.GETTER_IDX, "second", _g_get_second); Utils.RegisterFunc(L, Utils.SETTER_IDX, "first", _s_set_first); Utils.RegisterFunc(L, Utils.SETTER_IDX, "second", _s_set_second); 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) == 2 && translator.Assignable(L, 2)) { UnityEngine.SphereCollider _a = (UnityEngine.SphereCollider)translator.GetObject(L, 2, typeof(UnityEngine.SphereCollider)); var gen_ret = new UnityEngine.ClothSphereColliderPair(_a); translator.Push(L, gen_ret); return 1; } if(LuaAPI.lua_gettop(L) == 3 && translator.Assignable(L, 2) && translator.Assignable(L, 3)) { UnityEngine.SphereCollider _a = (UnityEngine.SphereCollider)translator.GetObject(L, 2, typeof(UnityEngine.SphereCollider)); UnityEngine.SphereCollider _b = (UnityEngine.SphereCollider)translator.GetObject(L, 3, typeof(UnityEngine.SphereCollider)); var gen_ret = new UnityEngine.ClothSphereColliderPair(_a, _b); translator.Push(L, gen_ret); return 1; } if (LuaAPI.lua_gettop(L) == 1) { translator.Push(L, default(UnityEngine.ClothSphereColliderPair)); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.ClothSphereColliderPair constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_first(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ClothSphereColliderPair gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.first); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_second(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ClothSphereColliderPair gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.second); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_first(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ClothSphereColliderPair gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.first = (UnityEngine.SphereCollider)translator.GetObject(L, 2, typeof(UnityEngine.SphereCollider)); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_second(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ClothSphereColliderPair gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.second = (UnityEngine.SphereCollider)translator.GetObject(L, 2, typeof(UnityEngine.SphereCollider)); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }