Ejemplo n.º 1
0
 public void SetAttribute(AttributeKeys key, AttributeSetTypes type, float value)
 {
     if (!ContainsAttribute(key))
     {
         throw new ArgumentException(string.Format("No atribute with the key {0} in the box.", key.ToString()));
     }
     else
     {
         Get(key).SetValue(type, value);
     }
 }
Ejemplo n.º 2
0
        public ValidatePayload ValidateDirect(ValidateType type, AttributeKeys key, AttributeSetTypes setType, float value)
        {
            ValidatePayload payload = ValidatePayload.CreateEmpty(type);

            SubAttribute(key, setType, value);

            if (type == ValidateType.Injured)
            {
                payload.damage = (int)value;
            }

            return(payload);
        }
Ejemplo n.º 3
0
 public void SubValue(AttributeSetTypes type, float value)
 {
     values[(int)type] -= value;
 }
Ejemplo n.º 4
0
 public void AddValue(AttributeSetTypes type, float value)
 {
     values[(int)type] += value;
 }
Ejemplo n.º 5
0
 public float GetValue(AttributeSetTypes type)
 {
     return(values[(int)type]);
 }