Ejemplo n.º 1
0
 public varChange this[bool Set]
 {
     set
     {
         changed = Set ? value : changed + value;
     }
 }
Ejemplo n.º 2
0
 public varChange this[statPart stat, bool setAll]
 {
     get
     {
         switch (stat)
         {
             case statPart.CURRENT: return currentChange;
             case statPart.MAX: return maxChange;
             case statPart.REGEN: return regenChange;
             default: return null;
         }
     }
     set
     {
         switch (stat)
         {
             case statPart.CURRENT:
                 if (setAll)
                 {
                     currentChange = value;
                 }
                 else
                 {
                     currentChange += value;
                 }
                 break;
             case statPart.MAX:
                 maxChange = setAll ? value : maxChange + value;
                 break;
             case statPart.REGEN:
                 regenChange = setAll ? value : regenChange + value;
                 break;
         }
     }
 }
Ejemplo n.º 3
0
 public Attribute(Destructible.ATTRIBUTE aName, float value = 0)
 {
     _value = value;
     _name = aName;
     changed = null;
 }
Ejemplo n.º 4
0
 //Constructors
 public Stat(Destructible.STAT __name, float __maxValue = 0, float __regenPerSecond = 0)
 {
     _name = __name;
     currentValue = maxValue = __maxValue;
     regenPerSecond = __regenPerSecond;
     currentChange = null;
     maxChange = null;
     regenChange = null;
 }