Ejemplo n.º 1
0
        static int _m_GetGroundHit(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.WheelCollider gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.WheelHit _hit;

                    var gen_ret = gen_to_be_invoked.GetGroundHit(out _hit);
                    LuaAPI.lua_pushboolean(L, gen_ret);
                    translator.Push(L, _hit);



                    return(2);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Ejemplo n.º 2
0
        static int _m_ConfigureVehicleSubsteps(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.WheelCollider gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);



                {
                    float _speedThreshold      = (float)LuaAPI.lua_tonumber(L, 2);
                    int   _stepsBelowThreshold = LuaAPI.xlua_tointeger(L, 3);
                    int   _stepsAboveThreshold = LuaAPI.xlua_tointeger(L, 4);

                    gen_to_be_invoked.ConfigureVehicleSubsteps(_speedThreshold, _stepsBelowThreshold, _stepsAboveThreshold);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Ejemplo n.º 3
0
        static int _m_GetWorldPose(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.WheelCollider __cl_gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.Vector3    pos;
                    UnityEngine.Quaternion quat;

                    __cl_gen_to_be_invoked.GetWorldPose(out pos, out quat);
                    translator.PushUnityEngineVector3(L, pos);

                    translator.PushUnityEngineQuaternion(L, quat);



                    return(2);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Ejemplo n.º 4
0
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *__ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new UnityEngine.WheelCollider();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Ejemplo n.º 5
0
        static int _s_set_suspensionExpansionLimited(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.WheelCollider gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.suspensionExpansionLimited = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Ejemplo n.º 6
0
        static int _g_get_isGrounded(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.WheelCollider gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isGrounded);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Ejemplo n.º 7
0
        static int _s_set_steerAngle(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.WheelCollider __cl_gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.steerAngle = (float)LuaAPI.lua_tonumber(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Ejemplo n.º 8
0
        static int _g_get_rpm(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.WheelCollider __cl_gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, __cl_gen_to_be_invoked.rpm);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Ejemplo n.º 9
0
        static int _s_set_sprungMass(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.WheelCollider gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.sprungMass = (float)LuaAPI.lua_tonumber(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Ejemplo n.º 10
0
        static int _g_get_sidewaysFriction(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.WheelCollider gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.sidewaysFriction);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Ejemplo n.º 11
0
        static int _s_set_sidewaysFriction(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.WheelCollider      __cl_gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                UnityEngine.WheelFrictionCurve __cl_gen_value; translator.Get(L, 2, out __cl_gen_value);
                __cl_gen_to_be_invoked.sidewaysFriction = __cl_gen_value;
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Ejemplo n.º 12
0
        static int _s_set_forwardFriction(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                UnityEngine.WheelCollider      gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);
                UnityEngine.WheelFrictionCurve gen_value; translator.Get(L, 2, out gen_value);
                gen_to_be_invoked.forwardFriction = gen_value;
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Ejemplo n.º 13
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    var gen_ret = new UnityEngine.WheelCollider();
                    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.WheelCollider constructor!"));
        }
Ejemplo n.º 14
0
        static int _m_ResetSprungMasses(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.WheelCollider gen_to_be_invoked = (UnityEngine.WheelCollider)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.ResetSprungMasses(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Ejemplo n.º 15
0
 public override void ReadFrom(object obj)
 {
     base.ReadFrom(obj);
     if (obj == null)
     {
         return;
     }
     UnityEngine.WheelCollider o = (UnityEngine.WheelCollider)obj;
     center                = o.center;
     radius                = o.radius;
     suspensionDistance    = o.suspensionDistance;
     suspensionSpring      = o.suspensionSpring;
     forceAppPointDistance = o.forceAppPointDistance;
     mass             = o.mass;
     wheelDampingRate = o.wheelDampingRate;
     forwardFriction  = o.forwardFriction;
     sidewaysFriction = o.sidewaysFriction;
     motorTorque      = o.motorTorque;
     brakeTorque      = o.brakeTorque;
     steerAngle       = o.steerAngle;
 }
Ejemplo n.º 16
0
 public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects)
 {
     obj = base.WriteTo(obj, objects);
     if (obj == null)
     {
         return(null);
     }
     UnityEngine.WheelCollider o = (UnityEngine.WheelCollider)obj;
     o.center                = center;
     o.radius                = radius;
     o.suspensionDistance    = suspensionDistance;
     o.suspensionSpring      = suspensionSpring;
     o.forceAppPointDistance = forceAppPointDistance;
     o.mass             = mass;
     o.wheelDampingRate = wheelDampingRate;
     o.forwardFriction  = forwardFriction;
     o.sidewaysFriction = sidewaysFriction;
     o.motorTorque      = motorTorque;
     o.brakeTorque      = brakeTorque;
     o.steerAngle       = steerAngle;
     return(o);
 }
 public static void LoadFrictions(this UnityEngine.WheelCollider wheel, WheelFrictions frictions) => frictions.Apply(wheel);
 public static WheelFrictions SaveFrictions(this UnityEngine.WheelCollider wheel) => new WheelFrictions(wheel);
 public static void LerpFrictions(this UnityEngine.WheelCollider wheel, WheelFrictions from, WheelFrictions to, float factor) => WheelFrictions.LerpFrictions(wheel, from, to, factor);