Esempio n. 1
0
        /// <summary>
        /// 打开手牌并结算
        /// </summary>
        public async ETVoid OpenAllGamerHandCard(CowCowSmallSettlementInfo[] info)
        {
            Dictionary <int, Gamer> gamers = GamerComponent.GetDictAll();

            for (int i = 0; i < info.Length; i++)
            {
                int[] cards = info[i].Cards.ToArray();
                UICowCow_GamerInfoComponent     gic   = gamers[info[i].SeatID].GetComponent <UICowCow_GamerInfoComponent>();
                UICowCow_SSGamerResultComponent ssgrc = gamers[info[i].SeatID].GetComponent <UICowCow_SSGamerResultComponent>();
                gic.ShowCards(cards);
                ssgrc.SetGamerSmallSettlement(info[i]);
            }
            await ETModel.Game.Scene.GetComponent <TimerComponent>().WaitAsync(5000);

            //在此延迟显示小结算
            SmallSettlement.ShowHideSmallSettlement(true);
            for (int i = 0; i < info.Length; i++)
            {
                int[] cards = info[i].Cards.ToArray();
                UICowCow_GamerInfoComponent     gic   = gamers[info[i].SeatID].GetComponent <UICowCow_GamerInfoComponent>();
                UICowCow_SSGamerResultComponent ssgrc = gamers[info[i].SeatID].GetComponent <UICowCow_SSGamerResultComponent>();
                gic.SetStatus(UIGamerStatus.Down);
                gic.SetCoin(info[i].BetCoin.ToString());
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 显示隐藏准备按钮
 /// </summary>
 public void ShowHideReadyButton(bool isShow)
 {
     readyBtn.GetComponent <CanvasGroup>().alpha          = isShow ? 1 : 0;
     readyBtn.GetComponent <CanvasGroup>().blocksRaycasts = isShow;
     if (!isShow)
     {
         //隐藏所有玩家手牌
         Dictionary <int, Gamer> gamers = GamerComponent.GetDictAll();
         foreach (Gamer gamer in gamers.Values)
         {
             gamer.GetComponent <UICowCow_GamerInfoComponent>().ShowHideHandCard(isShow);
         }
     }
 }
Esempio n. 3
0
        public void DealCardsGiveAllGamer(int seatId, int multiple)
        {
            this.ShowHideCardHeap(true);
            ResourcesComponent      rc     = ETModel.Game.Scene.GetComponent <ResourcesComponent>();
            Dictionary <int, Gamer> gamers = GamerComponent.GetDictAll();
            Sprite cardBG = (Sprite)rc.GetAsset(UICowCowAB.CowCow_Texture, "CardBG");

            foreach (KeyValuePair <int, Gamer> gamer in gamers)
            {
                UICowCow_GamerInfoComponent gic = gamer.Value.GetComponent <UICowCow_GamerInfoComponent>();
                if (seatId == gamer.Key && gamer.Key == GamerComponent.LocalSeatID)
                {
                    //庄家
                    gic.SetBankerCards(cardBG, multiple);
                }
                else
                {
                    gic.SetCards(cardBG, gamer.Key == GamerComponent.LocalSeatID);
                }
            }
        }