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); } }
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); }
public void SubValue(AttributeSetTypes type, float value) { values[(int)type] -= value; }
public void AddValue(AttributeSetTypes type, float value) { values[(int)type] += value; }
public float GetValue(AttributeSetTypes type) { return(values[(int)type]); }