public ActiveEquipmentDisplay(EquipmentDisplay equipDisplay, GameObject attachedObject, AttachmentSocket socket) { this.equipDisplay = equipDisplay; this.attachedObject = attachedObject; this.socket = socket; }
public Transform GetSocketTransform(AttachmentSocket slot) { switch (slot) { case AttachmentSocket.MainHand: if (mainHand != null) { return(mainHand); } else { return(transform); } case AttachmentSocket.MainHand2: if (mainHand2 != null) { return(mainHand2); } else { return(transform); } case AttachmentSocket.OffHand: if (offHand != null) { return(offHand); } else { return(transform); } case AttachmentSocket.OffHand2: if (offHand2 != null) { return(offHand2); } else { return(transform); } case AttachmentSocket.MainHandRest: if (mainHandRest != null) { return(mainHandRest); } else { return(transform); } case AttachmentSocket.MainHandRest2: if (mainHandRest2 != null) { return(mainHandRest2); } else { return(transform); } case AttachmentSocket.OffHandRest: if (offHandRest != null) { return(offHandRest); } else { return(transform); } case AttachmentSocket.OffHandRest2: if (offHandRest2 != null) { return(offHandRest2); } else { return(transform); } case AttachmentSocket.Shield: if (shield != null) { return(shield); } else { return(transform); } case AttachmentSocket.Shield2: if (shield2 != null) { return(shield2); } else { return(transform); } case AttachmentSocket.ShieldRest: if (shieldRest != null) { return(shieldRest); } else { return(transform); } case AttachmentSocket.ShieldRest2: if (shieldRest2 != null) { return(shieldRest2); } else { return(transform); } case AttachmentSocket.Head: if (head != null) { return(head); } else { return(transform); } case AttachmentSocket.LeftShoulder: if (leftShoulderSocket != null) { return(leftShoulderSocket); } else { return(transform); } case AttachmentSocket.RightShoulder: if (rightShoulderSocket != null) { return(rightShoulderSocket); } else { return(transform); } case AttachmentSocket.Root: return(transform); case AttachmentSocket.LeftFoot: if (leftFootSocket != null) { return(leftFootSocket); } else { return(transform); } case AttachmentSocket.RightFoot: if (rightFootSocket != null) { return(rightFootSocket); } else { return(transform); } case AttachmentSocket.Pelvis: if (pelvisSocket != null) { return(pelvisSocket); } else { return(transform); } case AttachmentSocket.LeftHip: if (leftHipSocket != null) { return(leftHipSocket); } else { return(transform); } case AttachmentSocket.RightHip: if (rightHipSocket != null) { return(rightHipSocket); } else { return(transform); } case AttachmentSocket.Chest: if (chestSocket != null) { return(chestSocket); } else { return(transform); } case AttachmentSocket.Back: if (backSocket != null) { return(backSocket); } else { return(transform); } case AttachmentSocket.Neck: if (neckSocket != null) { return(neckSocket); } else { return(transform); } case AttachmentSocket.Mouth: if (mouthSocket != null) { return(mouthSocket); } else { return(transform); } case AttachmentSocket.LeftEye: if (leftEyeSocket != null) { return(leftEyeSocket); } else { return(transform); } case AttachmentSocket.RightEye: if (rightEyeSocket != null) { return(rightEyeSocket); } else { return(transform); } case AttachmentSocket.Overhead: if (overheadSocket != null) { return(overheadSocket); } else { return(transform); } case AttachmentSocket.MainWeapon: if (mainHand != null && mainHand.childCount > 0) { return(mainHand.GetChild(0).Find("socket")); } else { return(null); } case AttachmentSocket.SecondaryWeapon: if (offHand != null) { return(offHand.GetChild(0).Find("socket")); } else { return(null); } } return(null); }