Exemple #1
0
 public float GetCurrentPercentageOf(INTAttributeTypes type)
 {
     float current = GetCurrent(type);
     if (current <= 0f)
         return 0f;
     return current/_attributes[(int) type].Total*100f;
 }
 public override void ApplyModifiers(INTAttribute attribute, INTAttributeTypes type)
 {
     if (type == INTAttributeTypes.Health)
         attribute.BaseModifier += 100;
 }
 public abstract void ApplyModifiers(INTAttribute attribute, INTAttributeTypes type);
Exemple #4
0
 public INTAttribute this[INTAttributeTypes type]
 {
     get { return this[(int) type]; }
     set { this[(int) type] = value; }
 }
Exemple #5
0
 public float GetCurrent(INTAttributeTypes type)
 {
     int lookup = (int) type;
     return _attributes[lookup].Total - _attributes[lookup].Damage;
 }