示例#1
0
        /// <summary>
        /// 当前面玩家都不要时,自动出牌
        /// </summary>
        void AutoOutCard()
        {
            var cdsList = HdCdsCtrl.SortCds(HdCdsListTemp);

            SelectCards(cdsList[cdsList.Length - 1]);
            OutCard();
        }
示例#2
0
        /// <summary>
        /// 给手牌发牌
        /// </summary>
        /// <param name="cds"></param>
        protected virtual void AllocateCds(int[] cds)
        {
            if (cds == null || cds.Length < 1)
            {
                return;
            }
            ClearAllOutCds();
            cds = HdCdsCtrl.SortCds(cds);
            var cdsLen = cds.Length;

            for (int i = 0; i < cdsLen; i++)
            {
                AddCdGob(_outcdItemOrg.gameObject, i + 2, cds[i]);
            }

            SortCdsGobPos();
        }
示例#3
0
        /// <summary>
        /// 给手牌发牌
        /// </summary>
        /// <param name="cds"></param>
        protected virtual void AllocateCds(int[] cds)
        {
            if (cds == null || cds.Length < 1)
            {
                return;
            }
            ClearAllOutCds();
            cds = HdCdsCtrl.SortCds(cds);
            var cdsLen = cds.Length;

            for (int i = 0; i < cdsLen; i++)
            {
                AddCdGob(_outcdItemOrg.gameObject, i + 2, cds[i]);
            }

            Table.GetComponent <UITable>().repositionNow = true;
        }
示例#4
0
        /// <summary>
        /// 出牌
        /// </summary>
        /// <param name="cds"></param>
        /// <param name="isDizhu">标记是不是地主发牌</param>
        public virtual void AllocateCds(int[] cds, bool isDizhu = false)
        {
            if (cds == null || cds.Length < 1)
            {
                return;
            }

            ClearAllOutCds();

            cds = HdCdsCtrl.SortCds(cds);
            var cdsLen    = cds.Length;
            var lastIndex = cdsLen - 1;

            for (int i = 0; i < cdsLen; i++)
            {
                AddCdGob(OutcdItemOrg.gameObject, 100 + i + 2, cds[i], i == lastIndex && isDizhu);
            }
            SortCdsGobPos();
        }
示例#5
0
        /// <summary>
        /// 有人出牌时,检查是否有炸弹火箭等,从而显示加倍
        /// </summary>
        /// <param name="args"></param>
        private void OnTypeOutCard(DdzbaseEventArgs args)
        {
            var data  = args.IsfObjData;
            var cards = data.GetIntArray(RequestKey.KeyCards);

            cards = HdCdsCtrl.SortCds(cards);
            var cdsType = PokerRuleUtil.GetCdsType(cards);

            if (cdsType == CardType.C4 || cdsType == CardType.C42 || cdsType == CardType.C5)
            {
                try
                {
                    int mul = 2;
                    //var curbeishu = int.Parse(BeiShuLabel.text);
                    _beishu *= mul;
                    BeiShuAnimAtion(mul);
                    BeiShuLabel.text = _beishu.ToString(CultureInfo.InvariantCulture);
                }
                catch (Exception e)
                {
                    YxDebug.LogError("BeiShuLabel有问题:" + e.Message);
                }
            }
        }