private void BigDeal() { if (_dealingCards.Count <= 0) { return; } var gdata = App.GameData; PokerInfo pokerInfo = _dealingCards.Dequeue(); //弹出要发的牌 int cardIndex = pokerInfo.CardIndex; //发到了第几张手牌 int cardSeat = pokerInfo.Seat; //发牌人座位号 var duifenPlayerPanel = gdata.GetPlayer <DuifenPlayerPanel>(cardSeat, true); Transform toPos = duifenPlayerPanel.PokersTrans[cardIndex % duifenPlayerPanel.PokersTrans.Length]; if (duifenPlayerPanel.HaveThisCard(cardIndex)) { duifenPlayerPanel.TurnCard(cardIndex, pokerInfo.PokerVal); } else { GameObject dealPoker = DealOnes(BigBirth, toPos, pokerInfo.PokerVal, cardIndex); //发牌 var pokerCard = dealPoker.GetComponent <PokerCard>(); pokerCard.SetCardFront(); duifenPlayerPanel.AddPoker(pokerCard); Facade.Instance <MusicManager>().Play("dealer"); App.GetGameManager <DuifenGameManager>().PublicPokers.Add(pokerCard); pokerCard.SetDiPaiMark(cardIndex <= 1); } }
public void BeginBigDeal(int[] pokers, int[] seats, int count, Action finish = null) { if (_dealingCards.Count <= 0) { _dealingCards.Clear(); } int pokersLength = pokers.Length; int seatsLength = seats.Length; //数据存储处理 for (int i = 0; i < pokersLength; i++) { PokerInfo pokerInfo = new PokerInfo { Seat = seats[i % seatsLength], PokerVal = pokers[i], CardIndex = count, }; _dealingCards.Enqueue(pokerInfo); } IsBigDeal = true; //开始发牌 OnFinish = finish; }
/// <summary> /// 发出接受到的所有牌 /// </summary> public void FastDeal() { if (_dealingCards.Count <= 0) { return; } IsBigDeal = false; int cardCount = _dealingCards.Count; for (int i = 0; i < cardCount; i++) { PokerInfo pokerInfo = _dealingCards.Dequeue(); var panel = App.GameData.GetPlayer <DuifenPlayerPanel>(pokerInfo.Seat, true); if (panel.HaveThisCard(pokerInfo.CardIndex)) { panel.TurnCard(pokerInfo.CardIndex, pokerInfo.PokerVal, false); } else { PokerCard poker = DealOnes(panel.PokersTrans[pokerInfo.CardIndex], pokerInfo.PokerVal, pokerInfo.CardIndex); panel.AddPoker(poker); } panel.ShowBetLabel(); } }
public void BeginBigDeal(int poker, int seat, int count, Action finish = null) { if (_dealingCards.Count <= 0) { _dealingCards.Clear(); } //数据存储处理 PokerInfo pokerInfo = new PokerInfo { Seat = seat, PokerVal = poker, CardIndex = count, }; _dealingCards.Enqueue(pokerInfo); IsBigDeal = true; //开始发牌 OnFinish = finish; }