/// <summary> /// 发出接受到的所有牌 /// </summary> public void FastDeal() { if (_dealingCards.Count <= 0) { return; } int selfSeat = App.GameData.SelfSeat; var gdata = App.GetGameData <PaiJiuGameData>(); int cardCount = _dealingCards.Count; for (int i = 0; i < cardCount; i++) { PaiJiuCardInfo pokerInfo = _dealingCards.Dequeue(); PaiJiuPlayer panel = gdata.GetPlayer <PaiJiuPlayer>(pokerInfo.Seat, true); PaiJiuCard card = DealOnes(panel.PokersTrans[pokerInfo.CardIndex], pokerInfo.PokerVal, pokerInfo.CardIndex, pokerInfo.Seat == selfSeat); panel.AddPoker(card); } }
private void BigDeal() { var main = App.GetGameManager <PaiJiuGameManager>(); var gdata = App.GetGameData <PaiJiuGameData>(); Debug.Log("===== dealcount == " + _dealCount + " , length = " + _dealingCards.Count + " ===== "); for (int i = 0; i < _dealCount; i++) { PaiJiuCardInfo pokerInfo = _dealingCards.Dequeue(); //弹出要发的牌 int cardIndex = pokerInfo.CardIndex; //发到了第几张手牌 int cardSeat = pokerInfo.Seat; //发牌人座位号 PaiJiuPlayer paiJiuPlayer = gdata.GetPlayer <PaiJiuPlayer>(cardSeat, true); Transform toPos = paiJiuPlayer.PokersTrans[cardIndex % paiJiuPlayer.PokersTrans.Length]; GameObject dealPoker = DealOnes(BigBirth, toPos, pokerInfo.PokerVal, cardSeat == App.GameData.SelfSeat, cardIndex); //发牌 PaiJiuCard pokerCard = dealPoker.GetComponent <PaiJiuCard>(); pokerCard.SetCardFront(); paiJiuPlayer.AddPoker(pokerCard); Facade.Instance <MusicManager>().Play("dealer"); main.PublicPokers.Add(pokerCard); } }