public static CardInfoAttribute Get(object obj) { Type _type = obj.GetType(); foreach (FieldInfo _field in _type.GetFields()) { CardInfoAttribute _attribute = Attribute.GetCustomAttribute(_field, typeof(CardInfoAttribute)) as CardInfoAttribute; if (_attribute == null) { continue; } if (!obj.Equals(_field.GetValue(null))) { continue; } return(_attribute); } return(null); }
public string GetValueName() { return(CardInfoAttribute.Get(this.m_CardValue).Name); }
public string GetTypeName() { return(CardInfoAttribute.Get(this.m_CardType).Name); }
public int GetValuePriority() { return(CardInfoAttribute.Get(this.m_CardValue).Priority); }
public int GetTypePriority() { return(CardInfoAttribute.Get(this.m_CardType).Priority); }