protected override IEnumerator SendCardAnimation(OnSendCardEventData cardData) { int cont = GameConfig.UserHandCardCnt * UtilData.CurrGamePalyerCnt; if (!GameConfig.IsNeedSendCardAnimation) { //不需要发牌动画时 直接设置手牌 WallMj[_getMahjongChair].PopMahjong(cont); int[] nomalCards = new int[GameConfig.UserHandCardCnt]; int startChair = cardData.currChair; for (int i = 0; i < UtilData.CurrGamePalyerCnt; i++) { HardMj[startChair].GetInMahjong(startChair == 0 ? cardData.playermj : nomalCards); startChair = UtilFunc.GetNextChair(startChair, UtilData.CurrGamePalyerCnt); } cardData.reduceMjCnt(cont); yield return(0); } else { int startChair = cardData.currChair; int meOffset = 0; int jj = 1; while (cont > 0) { int getInCnt = 4; int[] card = new int[getInCnt]; WallMj[_getMahjongChair].PopMahjong(getInCnt); if (startChair == 0) { for (int i = 0; i < card.Length; i++) { card[i] = cardData.playermj[meOffset + i]; } meOffset += card.Length; } else { for (int i = 0; i < card.Length; i++) { card[i] = 0; } } if (startChair == 0) { HardMj[startChair].OnSendMahjongForJp(card, GameConfig.SendCardUpTime, GameConfig.SendCardUpWait, cardData.laizi); } else { HardMj[startChair].OnSendMahjong(card, GameConfig.SendCardUpTime, GameConfig.SendCardUpWait); } cardData.reduceMjCnt(getInCnt); yield return(new WaitForSeconds(GameConfig.SendCardInterval)); cont -= getInCnt; startChair = UtilFunc.GetNextChair(startChair, UtilData.CurrGamePalyerCnt); } yield return(new WaitForSeconds(GameConfig.SendCardUpTime + GameConfig.SendCardUpWait)); } //发牌以后检索一遍自己手牌有没有漏掉的财神 CheckCaishenBug(); }
protected override IEnumerator FanPaiAnimation(OnSendCardEventData data) { data.reduceMjCnt(1); SetFpMahjongPos(data.fanpai, data.laizi); yield break; }