public MechPrefab GetPart(MechMountType mountType) { foreach (MechPrefab part in mechParts) { if ((part.mechType == _mechType || part.mechType == MechType.Any) && (part.partSizes.Contains(_mechSize) || part.partSizes.Count == 0) && (part.mountType == mountType)) { return(part); } } return(null); }
public MechPrefab GetPart(MechMountType mountType) { foreach(MechPrefab part in mechParts) { if((part.mechType == _mechType || part.mechType == MechType.Any) && (part.partSizes.Contains(_mechSize) || part.partSizes.Count == 0) && (part.mountType == mountType)) { return part; } } return null; }