Пример #1
0
        public static int GetInc(this AosAttribute attr)
        {
            if (!AttrFactors.ContainsKey(attr))
            {
                AttrFactors.Add(attr, new AttributeFactors());
            }

            return(AttrFactors[attr].Inc);
        }
Пример #2
0
        public static double GetWeight(this AosAttribute attr)
        {
            if (!AttrFactors.ContainsKey(attr))
            {
                AttrFactors.Add(attr, new AttributeFactors());
            }

            return(AttrFactors[attr].Weight);
        }
Пример #3
0
 public static void SetInc(this AosAttribute attr, int inc)
 {
     if (!AttrFactors.ContainsKey(attr))
     {
         AttrFactors.Add(
             attr,
             new AttributeFactors
         {
             Inc = inc
         });
     }
     else
     {
         AttrFactors[attr].Inc = inc;
     }
 }
Пример #4
0
 public static void SetMax(this AosAttribute attr, int max)
 {
     if (!AttrFactors.ContainsKey(attr))
     {
         AttrFactors.Add(
             attr,
             new AttributeFactors
         {
             Max = max
         });
     }
     else
     {
         AttrFactors[attr].Max = max;
     }
 }
Пример #5
0
 public static void SetMin(this AosAttribute attr, int min)
 {
     if (!AttrFactors.ContainsKey(attr))
     {
         AttrFactors.Add(
             attr,
             new AttributeFactors
         {
             Min = min
         });
     }
     else
     {
         AttrFactors[attr].Min = min;
     }
 }
Пример #6
0
 public static void SetWeight(this AosAttribute attr, double weight)
 {
     if (!AttrFactors.ContainsKey(attr))
     {
         AttrFactors.Add(
             attr,
             new AttributeFactors
         {
             Weight = weight
         });
     }
     else
     {
         AttrFactors[attr].Weight = weight;
     }
 }