Пример #1
0
        /// <summary>
        /// получаем название картинки в зависимости от масти карты
        /// </summary>
        public static string ChangePicture(TypeCardEnum type)
        {
            var result = type.ToString();

            try {
                var rand = new System.Random();
                if (type == TypeCardEnum.Attack ||
                    type == TypeCardEnum.Lending ||
                    type == TypeCardEnum.LookInFuture ||
                    type == TypeCardEnum.Mix ||
                    type == TypeCardEnum.No ||
                    type == TypeCardEnum.Skip ||
                    type == TypeCardEnum.Neutralize)
                {
                    result += rand.Next(1, 2);
                }
                else if (type == TypeCardEnum.Boomb)
                {
                    result += rand.Next(1, 4);
                }
                return(result);
            } catch (Exception ex) {
                Debug.Log(ex.Message);
                return(null);
            }
        }
Пример #2
0
 public CardModel(TypeCardEnum type)
 {
     Type = type;
 }
Пример #3
0
 public CardApiModel(int num, TypeCardEnum type, CardStatusEnum status)
 {
     IdCard     = num;
     Type       = type;
     CardStatus = status;
 }