示例#1
0
        /// <summary>
        /// 逐行展示手牌
        /// </summary>
        /// <param name="line">行数</param>
        /// <param name="matchInfo"></param>
        public void ShowHandPoker(int line, UserMatchInfo matchInfo)
        {
            int beginIndex = 0;
            int count      = 0;

            InitRange(line, ref beginIndex, ref count);

            List <int> cardValueList = matchInfo.Cards.GetRange(beginIndex, count);

            cardValueList = HelpLz.SortLineList(cardValueList, (CardType)matchInfo.DunTypeList[line]);

            //设置显示手牌
            for (int i = 0; i < UserCardList.Count; i++)
            {
                GameObject obj = UserCardList[i];
                if (i >= beginIndex && i < beginIndex + count)
                {
                    obj.transform.localScale = Vector3.one * (HandCardsTargetPosPar.Scale + .1f);
                    PokerCard card = obj.GetComponent <PokerCard>();
                    card.SetCardDepth(100 + i * 2);
                    card.SetCardId(cardValueList[i - beginIndex]);
                    card.SetCardFront();
                }
                else
                {
                    obj.transform.localScale = Vector3.one * HandCardsTargetPosPar.Scale;
                    obj.GetComponent <PokerCard>().SetCardDepth(i * 2);
                }
            }
        }
示例#2
0
        /// <summary>
        /// 显示每行的牌型
        /// </summary>
        /// <param name="line">第几行(0,1,2)</param>
        /// <param name="matchInfo"></param>
        public virtual void ShowType(int line, UserMatchInfo matchInfo)
        {
            _matchInfo = matchInfo;
            var curLine = _linesInfo[line];

            curLine.SetLineInfo(line, matchInfo);
            curLine.Show();
        }
示例#3
0
        public void SetSpecialPlayerInfo(UserMatchInfo matchInfo)
        {
            int seat        = matchInfo.Seat;
            var playerPanel = App.GameData.GetPlayer <SssPlayer>(seat, true);

            HeadImage.mainTexture = playerPanel.HeadPortrait.GetTexture();
            NameLabel.text        = playerPanel.Nick;
            _cardsList            = new List <int>(matchInfo.Cards);
            CreatePokers(_cardsList);
        }
示例#4
0
        public void OnGetGameInfoInif(UserMatchInfo matchInfo)
        {
            for (int i = 0; i < 3; i++)
            {
                ShowType(i, matchInfo);
                SetLineTotalScore(i);
            }

            ShowTotalScore(matchInfo.TtScore);
            var shootInfo = matchInfo.Shoot;

            ShowShootInfo(shootInfo.ShootCount, shootInfo.BeShootCount);
        }
示例#5
0
        public void ShowAllHandPoker(UserMatchInfo matchInfo)
        {
            List <int> cardsValList = matchInfo.Cards;

            if (UserCardList.Count < cardsValList.Count)
            {
                return;
            }

            for (int i = 0; i < cardsValList.Count; i++)
            {
                var poker = UserCardList[i].GetComponent <PokerCard>();
                poker.SetCardId(cardsValList[i]);
                poker.SetCardFront();
            }
        }
示例#6
0
        /// <summary>
        /// 显示手牌牌型
        /// </summary>
        /// <param name="line">行数</param>
        /// <param name="matchInfo">比牌数据</param>
        public void ShowCardType(int line, UserMatchInfo matchInfo)
        {
            if (HandCardsType == null)
            {
                return;
            }

            int      beginIndex = 0;
            int      count      = 0;
            CardType type       = (CardType)matchInfo.DunTypeList[line];

            InitRange(line, ref beginIndex, ref count);

            string typeName = GetLineTypeSriteName(line, type);

            App.GetGameManager <SssjpGameManager>().PlayOnesSound(typeName, Info.SexI);
            HandCardsType.ShowType(line, matchInfo); //显示手牌牌型

            StartCoroutine(HideHandPoker(line, beginIndex, count));
        }
示例#7
0
 public void GetGameInfoInitUser(UserMatchInfo matchInfo)
 {
     HandCardsType.OnGetGameInfoInif(matchInfo);
 }
示例#8
0
 /// <summary>
 /// 显示特殊牌型的玩家信息
 /// </summary>
 /// <param name="matchInfo"></param>
 internal void ShowSpecialPlayerInfo(UserMatchInfo matchInfo)
 {
     SetSpecialPlayerInfo(matchInfo);
     ShowSpecialPlayerInfo();
 }
示例#9
0
 public void SetLineInfo(int line, UserMatchInfo matchInfo)
 {
     Type = (CardType)matchInfo.DunTypeList[line];
     Line = line;
     SetLineInfo(line, matchInfo.NormalScores[line], matchInfo.AddScore[line], Type);
 }