public override void Collide(ref Vector3 particlePosition, float particleRadius) { float num1 = this.m_Radius * Mathf.Abs((float)((Component)this).get_transform().get_lossyScale().x); float num2 = this.m_Height * 0.5f - this.m_Radius; if ((double)num2 <= 0.0) { if (this.m_Bound == DynamicBoneColliderBase.Bound.Outside) { DynamicBoneCollider.OutsideSphere(ref particlePosition, particleRadius, ((Component)this).get_transform().TransformPoint(this.m_Center), num1); } else { DynamicBoneCollider.InsideSphere(ref particlePosition, particleRadius, ((Component)this).get_transform().TransformPoint(this.m_Center), num1); } } else { Vector3 center1 = this.m_Center; Vector3 center2 = this.m_Center; switch (this.m_Direction) { case DynamicBoneColliderBase.Direction.X: ref Vector3 local1 = ref center1; local1.x = (__Null)(local1.x - (double)num2); ref Vector3 local2 = ref center2; local2.x = (__Null)(local2.x + (double)num2); break;
// Token: 0x0600271F RID: 10015 RVA: 0x000C0EA8 File Offset: 0x000BF2A8 public void Collide(ref Vector3 particlePosition, float particleRadius) { float num = this.m_Radius * Mathf.Abs(base.transform.lossyScale.x); float num2 = this.m_Height * 0.5f - this.m_Radius; if (num2 <= 0f) { if (this.m_Bound == DynamicBoneCollider.Bound.Outside) { DynamicBoneCollider.OutsideSphere(ref particlePosition, particleRadius, base.transform.TransformPoint(this.m_Center), num); } else { DynamicBoneCollider.InsideSphere(ref particlePosition, particleRadius, base.transform.TransformPoint(this.m_Center), num); } } else { Vector3 center = this.m_Center; Vector3 center2 = this.m_Center; DynamicBoneCollider.Direction direction = this.m_Direction; if (direction != DynamicBoneCollider.Direction.X) { if (direction != DynamicBoneCollider.Direction.Y) { if (direction == DynamicBoneCollider.Direction.Z) { center.z -= num2; center2.z += num2; } } else { center.y -= num2; center2.y += num2; } } else { center.x -= num2; center2.x += num2; } if (this.m_Bound == DynamicBoneCollider.Bound.Outside) { DynamicBoneCollider.OutsideCapsule(ref particlePosition, particleRadius, base.transform.TransformPoint(center), base.transform.TransformPoint(center2), num); } else { DynamicBoneCollider.InsideCapsule(ref particlePosition, particleRadius, base.transform.TransformPoint(center), base.transform.TransformPoint(center2), num); } } }
// Token: 0x06000017 RID: 23 RVA: 0x000034B4 File Offset: 0x000016B4 public void Collide(ref Vector3 particlePosition, float particleRadius) { float num = this.m_Radius * Mathf.Abs(base.transform.lossyScale.x); float num2 = this.m_Height * 0.5f - this.m_Radius; bool flag = num2 <= 0f; if (flag) { bool flag2 = this.m_Bound == DynamicBoneCollider.Bound.Outside; if (flag2) { DynamicBoneCollider.OutsideSphere(ref particlePosition, particleRadius, base.transform.TransformPoint(this.m_Center), num); } else { DynamicBoneCollider.InsideSphere(ref particlePosition, particleRadius, base.transform.TransformPoint(this.m_Center), num); } } else { Vector3 center = this.m_Center; Vector3 center2 = this.m_Center; switch (this.m_Direction) { case DynamicBoneCollider.Direction.X: center.x -= num2; center2.x += num2; break; case DynamicBoneCollider.Direction.Y: center.y -= num2; center2.y += num2; break; case DynamicBoneCollider.Direction.Z: center.z -= num2; center2.z += num2; break; } bool flag3 = this.m_Bound == DynamicBoneCollider.Bound.Outside; if (flag3) { DynamicBoneCollider.OutsideCapsule(ref particlePosition, particleRadius, base.transform.TransformPoint(center), base.transform.TransformPoint(center2), num); } else { DynamicBoneCollider.InsideCapsule(ref particlePosition, particleRadius, base.transform.TransformPoint(center), base.transform.TransformPoint(center2), num); } } }