Example #1
0
 public virtual void SetMahjongNormalState(MahjongContainer item)
 {
     item.Lock = false;
     item.SetMahjongScript();
     item.SetThowOutCall(ThrowCardClickEvent);
     item.ResetPos();
 }
Example #2
0
        private void DoSelectTdhNiuClick(MahjongContainer mjItem)
        {
            var        list          = PlayerHand.MahjongList;
            List <int> cardValueList = new List <int>();

            for (int i = 0; i < list.Count; i++)
            {
                cardValueList.Add(list[i].Value);
            }
            int index = 0;

            for (int i = 0; i < cardValueList.Count; i++)
            {
                if (mjItem.Value == cardValueList[i])
                {
                    index = i;
                    break;
                }
            }
            int[] handCard = RemoveListItem(cardValueList.ToArray(), index, 1);
            Array.Sort(handCard);
            int isQiDui = CheckQiDui(handCard);

            if (isQiDui > 0)
            {
                int[] finalNiu = { isQiDui };
                GameCenter.Network.C2S.Custom <C2SCustom>().NiuTing(finalNiu, mjItem.Value);
                //如果打出的牌是抬起状态放下
                mjItem.ResetPos();
                return;
            }
            int[] findNiu = FindAutoLiang(handCard);
            GameCenter.Network.C2S.Custom <C2SCustom>().NiuTing(findNiu, mjItem.Value);
            //如果打出的牌是抬起状态放下
            mjItem.ResetPos();
        }
Example #3
0
        protected virtual void SwitchNormalState()
        {
            MahjongContainer item = null;
            var list = PlayerHand.MahjongList;

            for (int i = 0; i < list.Count; i++)
            {
                item      = list[i];
                item.Lock = false;
                item.SetMahjongScript();
                item.SetAllowOffsetStatus(true);
                item.SetThowOutCall(ThrowCardClickEvent);
                item.ResetPos();
            }
            UserContorl.ClearSelectCard();
        }
Example #4
0
        /// <summary>
        /// 切换为选换牌状态
        /// </summary>
        private void SwitchSelectCardsState()
        {
            MahjongContainer item = null;

            UserContorl.ClearSelectCard();
            var list = PlayerHand.MahjongList;

            for (int i = 0; i < list.Count; i++)
            {
                item = list[i];
                item.SetAllowOffsetStatus(false);
                item.SetThowOutCall(SwitchCardsClickEvent);
                item.Lock = false;
                //屏蔽牌的select事件
                item.SetSelectFlag(true);
                item.ResetPos();
            }
        }