public GetAttribute ( AttributeType targetAttributeType ) : |
||
targetAttributeType | AttributeType | |
return |
public Attribute GetAttribute(AttributeType targetAttributeType)
{
if (!attributes.ContainsKey(targetAttributeType))
{
Debug.Log("Can't found any attribute of type: " + targetAttributeType, this);
return null;
}
return attributes[targetAttributeType];
}
public override void ChangeValue(float targetValue) { Attribute armor = AttributePool.GetAttribute(AttributeType.Armor); if (armor != null) { targetValue += armor.CurrentValue; } base.ChangeValue(targetValue); }