/// <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); } } }