#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 UnityEnginePointEffector2DWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UnityEngine.PointEffector2D); Utils.BeginObjectRegister(type, L, translator, 0, 0, 8, 8); Utils.RegisterFunc(L, Utils.GETTER_IDX, "forceMagnitude", _g_get_forceMagnitude); Utils.RegisterFunc(L, Utils.GETTER_IDX, "forceVariation", _g_get_forceVariation); Utils.RegisterFunc(L, Utils.GETTER_IDX, "distanceScale", _g_get_distanceScale); Utils.RegisterFunc(L, Utils.GETTER_IDX, "drag", _g_get_drag); Utils.RegisterFunc(L, Utils.GETTER_IDX, "angularDrag", _g_get_angularDrag); Utils.RegisterFunc(L, Utils.GETTER_IDX, "forceSource", _g_get_forceSource); Utils.RegisterFunc(L, Utils.GETTER_IDX, "forceTarget", _g_get_forceTarget); Utils.RegisterFunc(L, Utils.GETTER_IDX, "forceMode", _g_get_forceMode); Utils.RegisterFunc(L, Utils.SETTER_IDX, "forceMagnitude", _s_set_forceMagnitude); Utils.RegisterFunc(L, Utils.SETTER_IDX, "forceVariation", _s_set_forceVariation); Utils.RegisterFunc(L, Utils.SETTER_IDX, "distanceScale", _s_set_distanceScale); Utils.RegisterFunc(L, Utils.SETTER_IDX, "drag", _s_set_drag); Utils.RegisterFunc(L, Utils.SETTER_IDX, "angularDrag", _s_set_angularDrag); Utils.RegisterFunc(L, Utils.SETTER_IDX, "forceSource", _s_set_forceSource); Utils.RegisterFunc(L, Utils.SETTER_IDX, "forceTarget", _s_set_forceTarget); Utils.RegisterFunc(L, Utils.SETTER_IDX, "forceMode", _s_set_forceMode); 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) { var gen_ret = new UnityEngine.PointEffector2D(); 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 UnityEngine.PointEffector2D constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_forceMagnitude(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.forceMagnitude); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_forceVariation(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.forceVariation); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_distanceScale(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.distanceScale); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_drag(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.drag); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_angularDrag(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.angularDrag); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_forceSource(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.forceSource); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_forceTarget(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.forceTarget); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_forceMode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.forceMode); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_forceMagnitude(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); gen_to_be_invoked.forceMagnitude = (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_forceVariation(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); gen_to_be_invoked.forceVariation = (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_distanceScale(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); gen_to_be_invoked.distanceScale = (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_drag(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); gen_to_be_invoked.drag = (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_angularDrag(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); gen_to_be_invoked.angularDrag = (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_forceSource(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); UnityEngine.EffectorSelection2D gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.forceSource = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_forceTarget(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); UnityEngine.EffectorSelection2D gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.forceTarget = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_forceMode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PointEffector2D gen_to_be_invoked = (UnityEngine.PointEffector2D)translator.FastGetCSObj(L, 1); UnityEngine.EffectorForceMode2D gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.forceMode = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }