Ejemplo n.º 1
0
 /// <summary>
 /// 结算显示手牌
 /// </summary>
 public void ShowCards(int[] cards)
 {
     for (int i = 0; i < this.cards.Length; i++)
     {
         Sprite sprite = (Sprite)res.GetAsset(UICowCowAB.CowCow_Texture, CardHelper.GetCardAssetName(cards[i]));
         this.cards[i].sprite = sprite;
     }
     this.ShowHideHandCard(true);
 }
Ejemplo n.º 2
0
 public void SeeSelfCards(int n)
 {
     submitCard.Multiple = n;
     for (int i = 0; i < cardList.Count; i++)
     {
         this.cards[i].sprite = (Sprite)res.GetAsset(UICowCowAB.CowCow_Texture, CardHelper.GetCardAssetName(cardList[i]));
     }
     this.ShowHidePromptButton(true);
 }
        public void SetGamerSmallSettlement(CowCowSmallSettlementInfo info)
        {
            this.banker.alpha   = info.SeatID == 0 ? 1 : 0;
            this.gamerName.text = Game.Scene.GetComponent <UIComponent>().Get(UICowCowType.CowCowGameRoom).GetComponent <UICowCow_GameRoomComponent>().GamerComponent.Get(info.SeatID).GetComponent <UICowCow_GamerInfoComponent>().gamerName;
            this.bets.text      = info.Multiple.ToString();
            switch ((CowType)info.CardsType)
            {
            case CowType.None:
                this.cardType.text = "无牛";
                break;

            case CowType.HaveCow:
                int num = info.CowNumber % tan;
                if (num == 0)
                {
                    this.cardType.text = "牛牛";
                }
                else
                {
                    this.cardType.text = $"牛{num}";
                }
                break;

            case CowType.FiveFlowerCow:
                this.cardType.text = "五花牛";
                break;

            case CowType.BombCow:
                this.cardType.text = "炸弹牛";
                break;

            case CowType.FiveSmallCow:
                this.cardType.text = "五小牛";
                break;
            }
            this.score.text = info.LoseWin > 0 ? $"+{info.LoseWin}" : $"{info.LoseWin}";
            for (int i = 0; i < this.cards.Length; i++)
            {
                this.cards[i].sprite = (Sprite)this.res.GetAsset(UICowCowAB.CowCow_Texture, CardHelper.GetCardAssetName(info.Cards[i]));
            }
        }