Beispiel #1
0
    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);
    }
Beispiel #2
0
    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;
    }