Keeps two Rigidbody2D at their relative orientations.
static public int set_autoConfigureOffset(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.RelativeJoint2D self = (UnityEngine.RelativeJoint2D)checkSelf(l); bool v; checkType(l, 2, out v); self.autoConfigureOffset = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int get_maxTorque(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.RelativeJoint2D self = (UnityEngine.RelativeJoint2D)checkSelf(l); pushValue(l, true); pushValue(l, self.maxTorque); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static void RelativeJoint2D_target(JSVCall vc) { UnityEngine.RelativeJoint2D _this = (UnityEngine.RelativeJoint2D)vc.csObj; var result = _this.target; JSApi.setVector2S((int)JSApi.SetType.Rval, result); }
static public int get_correctionScale(IntPtr l) { try { UnityEngine.RelativeJoint2D self = (UnityEngine.RelativeJoint2D)checkSelf(l); pushValue(l, true); pushValue(l, self.correctionScale); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int get_angularOffset(IntPtr l) { try { UnityEngine.RelativeJoint2D self = (UnityEngine.RelativeJoint2D)checkSelf(l); pushValue(l, true); pushValue(l, self.angularOffset); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { UnityEngine.RelativeJoint2D o; o = new UnityEngine.RelativeJoint2D(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int set_correctionScale(IntPtr l) { try { UnityEngine.RelativeJoint2D self = (UnityEngine.RelativeJoint2D)checkSelf(l); float v; checkType(l, 2, out v); self.correctionScale = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_linearOffset(IntPtr l) { try { UnityEngine.RelativeJoint2D self = (UnityEngine.RelativeJoint2D)checkSelf(l); UnityEngine.Vector2 v; checkType(l, 2, out v); self.linearOffset = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_autoConfigureOffset(IntPtr l) { try { UnityEngine.RelativeJoint2D self = (UnityEngine.RelativeJoint2D)checkSelf(l); bool v; checkType(l, 2, out v); self.autoConfigureOffset = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static void RelativeJoint2D_autoConfigureOffset(JSVCall vc) { if (vc.bGet) { UnityEngine.RelativeJoint2D _this = (UnityEngine.RelativeJoint2D)vc.csObj; var result = _this.autoConfigureOffset; JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result)); } else { System.Boolean arg0 = (System.Boolean)JSApi.getBooleanS((int)JSApi.GetType.Arg); UnityEngine.RelativeJoint2D _this = (UnityEngine.RelativeJoint2D)vc.csObj; _this.autoConfigureOffset = arg0; } }
static void RelativeJoint2D_correctionScale(JSVCall vc) { if (vc.bGet) { UnityEngine.RelativeJoint2D _this = (UnityEngine.RelativeJoint2D)vc.csObj; var result = _this.correctionScale; JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(result)); } else { System.Single arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg); UnityEngine.RelativeJoint2D _this = (UnityEngine.RelativeJoint2D)vc.csObj; _this.correctionScale = arg0; } }
static void RelativeJoint2D_linearOffset(JSVCall vc) { if (vc.bGet) { UnityEngine.RelativeJoint2D _this = (UnityEngine.RelativeJoint2D)vc.csObj; var result = _this.linearOffset; JSApi.setVector2S((int)JSApi.SetType.Rval, result); } else { UnityEngine.Vector2 arg0 = (UnityEngine.Vector2)JSApi.getVector2S((int)JSApi.GetType.Arg); UnityEngine.RelativeJoint2D _this = (UnityEngine.RelativeJoint2D)vc.csObj; _this.linearOffset = arg0; } }
/// <summary> /// Write the specified value using the writer. /// </summary> /// <param name="value">Value.</param> /// <param name="writer">Writer.</param> public override void Write(object value, ISaveGameWriter writer) { UnityEngine.RelativeJoint2D relativeJoint2D = (UnityEngine.RelativeJoint2D)value; writer.WriteProperty("maxForce", relativeJoint2D.maxForce); writer.WriteProperty("maxTorque", relativeJoint2D.maxTorque); writer.WriteProperty("correctionScale", relativeJoint2D.correctionScale); writer.WriteProperty("autoConfigureOffset", relativeJoint2D.autoConfigureOffset); writer.WriteProperty("linearOffset", relativeJoint2D.linearOffset); writer.WriteProperty("angularOffset", relativeJoint2D.angularOffset); writer.WriteProperty("connectedBody", relativeJoint2D.connectedBody); writer.WriteProperty("enableCollision", relativeJoint2D.enableCollision); writer.WriteProperty("breakForce", relativeJoint2D.breakForce); writer.WriteProperty("breakTorque", relativeJoint2D.breakTorque); writer.WriteProperty("enabled", relativeJoint2D.enabled); writer.WriteProperty("tag", relativeJoint2D.tag); writer.WriteProperty("name", relativeJoint2D.name); writer.WriteProperty("hideFlags", relativeJoint2D.hideFlags); }
public void ApplyTheSticky(Collider2D coll, RelativeJoint2D jointToApplyStick) { GameObject otherObject = coll.gameObject; if (otherObject.tag == "Ball" && sticky) { jointToApplyStick.connectedBody = otherObject.GetComponent<Rigidbody2D>(); otherObject.GetComponent<BallController>().jointConnectTo = jointToApplyStick; } }
/// <summary> /// Read the data into the specified value. /// </summary> /// <param name="value">Value.</param> /// <param name="reader">Reader.</param> public override void ReadInto(object value, ISaveGameReader reader) { UnityEngine.RelativeJoint2D relativeJoint2D = (UnityEngine.RelativeJoint2D)value; foreach (string property in reader.Properties) { switch (property) { case "maxForce": relativeJoint2D.maxForce = reader.ReadProperty <System.Single> (); break; case "maxTorque": relativeJoint2D.maxTorque = reader.ReadProperty <System.Single> (); break; case "correctionScale": relativeJoint2D.correctionScale = reader.ReadProperty <System.Single> (); break; case "autoConfigureOffset": relativeJoint2D.autoConfigureOffset = reader.ReadProperty <System.Boolean> (); break; case "linearOffset": relativeJoint2D.linearOffset = reader.ReadProperty <UnityEngine.Vector2> (); break; case "angularOffset": relativeJoint2D.angularOffset = reader.ReadProperty <System.Single> (); break; case "connectedBody": if (relativeJoint2D.connectedBody == null) { relativeJoint2D.connectedBody = reader.ReadProperty <UnityEngine.Rigidbody2D> (); } else { reader.ReadIntoProperty <UnityEngine.Rigidbody2D> (relativeJoint2D.connectedBody); } break; case "enableCollision": relativeJoint2D.enableCollision = reader.ReadProperty <System.Boolean> (); break; case "breakForce": relativeJoint2D.breakForce = reader.ReadProperty <System.Single> (); break; case "breakTorque": relativeJoint2D.breakTorque = reader.ReadProperty <System.Single> (); break; case "enabled": relativeJoint2D.enabled = reader.ReadProperty <System.Boolean> (); break; case "tag": relativeJoint2D.tag = reader.ReadProperty <System.String> (); break; case "name": relativeJoint2D.name = reader.ReadProperty <System.String> (); break; case "hideFlags": relativeJoint2D.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> (); break; } } }
/// <summary> /// Read the data using the reader. /// </summary> /// <param name="reader">Reader.</param> public override object Read(ISaveGameReader reader) { UnityEngine.RelativeJoint2D relativeJoint2D = SaveGameType.CreateComponent <UnityEngine.RelativeJoint2D> (); ReadInto(relativeJoint2D, reader); return(relativeJoint2D); }