Esempio n. 1
0
        /// <summary>
        /// 直接显示牌的面值
        /// </summary>
        /// <param name="cardVal"></param>
        /// <param name="index"></param>
        public void SetPokerValue(int cardVal, int index)
        {
            if (index >= PlayerPokers.Count)
            {
                return;
            }

            PokerCard card = PlayerPokers[index];

            if (card == null)
            {
                return;
            }
            card.SetCardId(cardVal);
            card.SetCardFront();
        }
Esempio n. 2
0
        /// <summary>
        /// 翻转一张手牌
        /// </summary>
        /// <param name="cardIndex">牌的索引</param>
        /// <param name="val">手牌的值</param>
        /// <param name="withAnim">是否有动画</param>
        internal virtual void TurnCard(int cardIndex, int val, bool withAnim = true)
        {
            //PokerCard poker = UserBetPoker.PlayerPokers[cardIndex];
            PokerCard poker = UserBetPoker.GetPokerCard(cardIndex);

            if (poker == null)
            {
                return;
            }

            if (PlayerType == 3)    //玩家弃牌不翻牌
            {
                return;
            }

            //已经翻牌了不翻牌
            int preVal = poker.Id;

            if (preVal == val)
            {
                return;
            }

            poker.SetCardId(val);

            if (withAnim)
            {
                if (preVal == 0)
                {
                    poker.TurnCard();
                    UserBetPoker.AddPokerVal(poker.Value);
                }
            }
            else
            {
                if (preVal == 0)
                {
                    UserBetPoker.AddPokerVal(poker.Value);
                    poker.SetCardFront();
                }
            }
        }
Esempio n. 3
0
 internal void AddPoker(PokerCard pokerCard)
 {
     PlayerPokers.Add(pokerCard);
     AddPokerVal(pokerCard.Value);
 }
Esempio n. 4
0
 internal void AddPoker(PokerCard pokerCard)
 {
     UserBetPoker.AddPoker(pokerCard);
 }