public override bool PeiceInspectorGUI() { bool flag = base.PeiceInspectorGUI(); string str = base.peiceID; if (AuthorShared.StringField("Title", ref str, new GUILayoutOption[0])) { base.peiceID = str; flag = true; } bool flag1 = (!this.mirrored ? false : this.mirrored != this.bone); bool flag2 = this.bone; BodyPart bodyPart = this.bodyPart; if (AuthorShared.ObjectField <Transform>("Bone", ref this.bone, AuthorShared.ObjectFieldFlags.AllowScene | AuthorShared.ObjectFieldFlags.Model | AuthorShared.ObjectFieldFlags.Instance, new GUILayoutOption[0])) { if (!flag2) { this.FigureOutDefaultBodyPart(this.bone, ref bodyPart); } flag = true; } BodyPart bodyPart1 = this.mirroredBodyPart; if (flag2) { bodyPart = (BodyPart)AuthorShared.EnumField("Body Part", bodyPart, new GUILayoutOption[0]); } GUI.Box(AuthorShared.BeginVertical(new GUILayoutOption[0]), GUIContent.none); flag = flag | AuthorShared.ObjectField <Transform>("Mirrored Bone", ref this.mirrored, AuthorShared.ObjectFieldFlags.AllowScene | AuthorShared.ObjectFieldFlags.Model | AuthorShared.ObjectFieldFlags.Instance, new GUILayoutOption[0]); if (flag1) { bodyPart1 = (BodyPart)AuthorShared.EnumField("Body Part", bodyPart1, new GUILayoutOption[0]); AuthorShared.BeginHorizontal(new GUILayoutOption[0]); bool flag3 = GUILayout.Toggle(this.mirrorX, "Mirror X", new GUILayoutOption[0]); bool flag4 = GUILayout.Toggle(this.mirrorY, "Mirror Y", new GUILayoutOption[0]); bool flag5 = GUILayout.Toggle(this.mirrorZ, "Mirror Z", new GUILayoutOption[0]); AuthorShared.EndHorizontal(); if (flag3 != this.mirrorX || flag4 != this.mirrorY || flag5 != this.mirrorZ) { this.mirrorX = flag3; this.mirrorY = flag4; this.mirrorZ = flag5; flag = true; } } AuthorShared.EndVertical(); Vector3 vector3 = this.center; float single = this.radius; float single1 = this.height; Vector3 vector31 = this.size; int num = this.capsuleAxis; AuthorShared.BeginSubSection("Shape", new GUILayoutOption[0]); HitShapeKind hitShapeKind = (HitShapeKind)AuthorShared.EnumField("Kind", this.kind, new GUILayoutOption[0]); switch (this.kind) { case HitShapeKind.Sphere: { vector3 = AuthorShared.Vector3Field("Center", this.center, new GUILayoutOption[0]); single = Mathf.Max(AuthorShared.FloatField("Radius", this.radius, new GUILayoutOption[0]), 0.001f); goto case HitShapeKind.Line; } case HitShapeKind.Capsule: { vector3 = AuthorShared.Vector3Field("Center", this.center, new GUILayoutOption[0]); single = Mathf.Max(AuthorShared.FloatField("Radius", this.radius, new GUILayoutOption[0]), 0.001f); single1 = Mathf.Max(AuthorShared.FloatField("Height", this.height, new GUILayoutOption[0]), 0.001f); num = Mathf.Clamp(AuthorShared.IntField("Height Axis", this.capsuleAxis, new GUILayoutOption[0]), 0, 2); goto case HitShapeKind.Line; } case HitShapeKind.Line: { AuthorShared.EndSubSection(); AuthorShared.BeginSubSection("Rigidbody", new GUILayoutOption[0]); float single2 = Mathf.Max(AuthorShared.FloatField("Mass", this.mass, new GUILayoutOption[0]), 0.001f); float single3 = Mathf.Max(AuthorShared.FloatField("Drag", this.drag, new GUILayoutOption[0]), 0f); float single4 = Mathf.Max(AuthorShared.FloatField("Angular Drag", this.angularDrag, new GUILayoutOption[0]), 0f); AuthorShared.EndSubSection(); AuthorShared.BeginSubSection("Hit Box", new GUILayoutOption[0]); int num1 = this.hitPriority; float single5 = this.damageMultiplier; if (flag1 || flag2) { num1 = AuthorShared.IntField("Hit Priority", num1, new GUILayoutOption[0]); single5 = AuthorShared.FloatField("Damage Mult.", single5, new GUILayoutOption[0]); } AuthorShared.EndSubSection(); bool flag6 = GUILayout.Button("Add Joint", new GUILayoutOption[0]); if (Event.current.type == EventType.Repaint) { this.lastPopupRect = GUILayoutUtility.GetLastRect(); } if (flag6) { AuthorShared.CustomMenu(this.lastPopupRect, AuthorChHit.JointMenu.options, 0, new AuthorShared.CustomMenuProc(AuthorChHit.JointMenu.Callback), this); } if (hitShapeKind != this.kind || vector3 != this.center || vector31 != this.size || single != this.radius || single1 != this.height || num != this.capsuleAxis || single2 != this.mass || single3 != this.drag || single4 != this.angularDrag || bodyPart != this.bodyPart || bodyPart1 != this.mirroredBodyPart || this.hitPriority != num1 || single5 != this.damageMultiplier) { flag = true; this.kind = hitShapeKind; this.center = vector3; this.size = vector31; this.radius = single; this.height = single1; this.capsuleAxis = num; this.mass = single2; this.drag = single3; this.angularDrag = single4; this.bodyPart = bodyPart; this.mirroredBodyPart = bodyPart1; this.hitPriority = num1; this.damageMultiplier = single5; } return(flag); } case HitShapeKind.Box: { vector3 = AuthorShared.Vector3Field("Center", this.center, new GUILayoutOption[0]); vector31 = AuthorShared.Vector3Field("Size", this.size, new GUILayoutOption[0]); goto case HitShapeKind.Line; } default: { goto case HitShapeKind.Line; } } }