Exemplo n.º 1
0
        /// <summary>
        /// byte列表转int列表(牌的Value)
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public static List <int> CardFromByteToValue(List <byte> list)
        {
            List <int> intList = new List <int>();

            for (int i = 0; i < list.Count; i++)
            {
                intList.Add(DDZGameHelper.GetPokerNum(list[i]));
            }

            return(intList);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 设置扑克牌
        /// </summary>
        /// <param name="poker"></param>
        public void SetPokerImageSprite(byte pokerId, bool isDiZhu = false)
        {
            this.Panel.SetActive(true);

            this.pokerId = pokerId;

            this.isDiZhu = isDiZhu;

            this.pokerInt = PokerCardsHelper.GetPokerOfInt(pokerId);

            this.pokerValue = DDZGameHelper.GetPokerNum(pokerId);

            _poker.sprite = SpriteHelper.GetPokerSprite(PokerCardsHelper.GetPokerOfInt(pokerId));

            this._dizhu.SetActive(isDiZhu);
        }