/// <summary> /// 协程延迟发牌 /// </summary> private IEnumerator IEOnCastCard(NNonCastCard data) { mCastDown = false; yield return(new WaitUntil(() => { return mRandomZhuangDown == true; })); if (data.selfCards != null && NiuniuModel.Inst.mGameedSeatIdList != null) { List <string> Othercards = new List <string>(); for (int i = 0; i < data.selfCards.Count; i++) { Othercards.Add("0"); } for (int i = 0; i < NiuniuModel.Inst.mGameedSeatIdList.Count; i++) { NiuniuPlayerUI player = null; if (TryGetPlayer(NiuniuModel.Inst.mGameedSeatIdList[i], out player)) { if (NiuniuModel.Inst.mGameedSeatIdList[i] == NiuniuModel.Inst.mMySeatId) { if (data.cardsType != null) { player.SetCardsType(data.cardsType); } if (data.selfCards.Count == 4) { player.CastCardWithAnim(NiuniuModel.Inst.mGameedSeatIdList[i], data.selfCards, true); } else { player.CastCardWithAnim(NiuniuModel.Inst.mGameedSeatIdList[i], data.selfCards, false); } } else { player.CastCardWithAnim(NiuniuModel.Inst.mGameedSeatIdList[i], Othercards, false); } } } } yield return(new WaitForSeconds(0.2f * data.selfCards.Count)); mCastDown = true; if (data.canShowCard) { if (NiuniuModel.Inst.mGameed) { mSelfPlayer.SetLiangCardBtnState(true); mSelfPlayer.SetCuoBtnState(true); } ShowLastTime("亮牌倒计时", data.lastTime - 2); } }