/// <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()); } }
protected override void Run(ETModel.Session session, Actor_CowCowEmoji message) { UICowCow_GameRoomComponent room = Game.Scene.GetComponent <UIComponent>().Get(UICowCowType.CowCowGameRoom).GetComponent <UICowCow_GameRoomComponent>(); UICowCow_GamerInfoComponent gameInfo = room.GamerComponent.Get(message.SeatID).GetComponent <UICowCow_GamerInfoComponent>(); gameInfo.ShowEmoji(message.Index); }
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); } }
/// <summary> /// 发牌,只发给自己 /// </summary> protected override void Run(ETModel.Session session, Actor_CowCowRoomDealCards message) { ResourcesComponent res = ETModel.Game.Scene.GetComponent <ResourcesComponent>(); UICowCow_GameRoomComponent room = Game.Scene.GetComponent <UIComponent>().Get(UICowCowType.CowCowGameRoom).GetComponent <UICowCow_GameRoomComponent>(); UICowCow_GamerInfoComponent gic = room.GamerComponent.LocalGamer.GetComponent <UICowCow_GamerInfoComponent>(); gic.SetCards(message.Cards.ToArray()); room.DealCardsGiveAllGamer(message.SeatID, message.Multiple); Dictionary <int, Gamer> gamers = room.GamerComponent.GetDictAll(); foreach (Gamer gamer in gamers.Values) { gamer.GetComponent <UICowCow_GamerInfoComponent>().ShowHideBankerIcon(false); } room.GamerComponent.Get(message.SeatID).GetComponent <UICowCow_GamerInfoComponent>().ShowHideBankerIcon(true); }
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); } } }