Example #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());
            }
        }
Example #2
0
 public void GamerReady(int[] seatIds)
 {
     for (int i = 0; i < seatIds.Length; i++)
     {
         UICowCow_GamerInfoComponent gc = GamerComponent.Get(seatIds[i]).GetComponent <UICowCow_GamerInfoComponent>();
         if (gc.Status != UIGamerStatus.Ready)
         {
             gc.SetStatus(UIGamerStatus.Ready, UIGamerStatusString.Ready);
         }
     }
 }
        public static async ETVoid OnReady(int seatId)
        {
            Session session = Game.Scene.GetComponent <SessionComponent>().Session;
            M2C_CowCowGamerReady m2c_Ready = (M2C_CowCowGamerReady)await session.Call(new C2M_CowCowGamerReady()
            {
                UserID = ClientComponent.Instance.User.UserID, SeatID = seatId
            });

            if (m2c_Ready.Error == 0)
            {
                UICowCow_GameRoomComponent  room = Game.Scene.GetComponent <UIComponent>().Get(UICowCowType.CowCowGameRoom).GetComponent <UICowCow_GameRoomComponent>();
                UICowCow_GamerInfoComponent gc   = room.GamerComponent.LocalGamer.GetComponent <UICowCow_GamerInfoComponent>();
                room.ShowHideReadyButton(false);
                gc.SetStatus(UIGamerStatus.Ready, UIGamerStatusString.Ready);
            }
        }