Exemple #1
0
        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);
        }
Exemple #2
0
 public string GetValueName()
 {
     return(CardInfoAttribute.Get(this.m_CardValue).Name);
 }
Exemple #3
0
 public string GetTypeName()
 {
     return(CardInfoAttribute.Get(this.m_CardType).Name);
 }
Exemple #4
0
 public int GetValuePriority()
 {
     return(CardInfoAttribute.Get(this.m_CardValue).Priority);
 }
Exemple #5
0
 public int GetTypePriority()
 {
     return(CardInfoAttribute.Get(this.m_CardType).Priority);
 }