Example #1
0
        public static GrowthStandartWear? GetGrowthStandart(СlothesType wearCategory, ClothesSex sex)
        {
            var att = wearCategory.GetAttribute<NeedGrowthAttribute> ();
            if (att == null)
                return null;

            if (sex == ClothesSex.Women)
                return GrowthStandartWear.Women;

            if (sex == ClothesSex.Men)
                return GrowthStandartWear.Men;

            if (sex == ClothesSex.Universal)
                return GrowthStandartWear.Universal;

            return null;
        }
Example #2
0
        public static Type GetSizeStandartsEnum(СlothesType wearCategory, ClothesSex sex)
        {
            var att = wearCategory.GetAttributes<SizeStandartsAttribute> ();
            if (att.Length == 0)
                return null;

            var found = att.FirstOrDefault (a => a.Sex == sex);

            return found != null ? found.StandartsEnumType : null;
        }
Example #3
0
 public SizeStandartsAttribute(Type enumStd, ClothesSex sex, SizeUse use = SizeUse.Both)
 {
     StandartsEnumType = enumStd;
     Sex = sex;
     Use = use;
 }