示例#1
0
 public static KeyValuePair <Attribute, short> MakeAttributeAmountPair(AttributeAmount source, float rate)
 {
     if (source.attribute == null)
     {
         return(new KeyValuePair <Attribute, short>());
     }
     return(new KeyValuePair <Attribute, short>(source.attribute, (short)(source.amount * rate)));
 }
示例#2
0
    public static CharacterStats GetStats(this AttributeAmount attributeAmount)
    {
        if (attributeAmount.attribute == null)
        {
            return(new CharacterStats());
        }
        var attribute = attributeAmount.attribute;

        return(attribute.GetStats(attributeAmount.amount));
    }