/// <summary> /// 头像框显示庄家标志 /// </summary> private void UpdateBankerIcon() { var bankerInfoVO = battleProxy.GetBankerPlayerInfoVOS2C(); for (var i = 0; i < View.headItemList.Count; i++) { View.headItemList[i].GetComponent <HeadItem>().ShowBankerIcon(bankerInfoVO.userId); } }
/// <summary> /// 抛出停止旋转事件 /// </summary> public void DispatchEndRotate() { AudioSystem.Instance.StopEffectAudio("Voices/Effect/MasterRotate"); Timer.Instance.CancelTimer(rotateTimeId); var selfInfoVO = battleProxy.playerIdInfoDic[playerInfoProxy.userID]; var bankerInfoVO = battleProxy.GetBankerPlayerInfoVOS2C(); var sitIndex = (bankerInfoVO.sit - selfInfoVO.sit + GlobalData.SIT_NUM) % GlobalData.SIT_NUM; arrowContainer.localEulerAngles = new Vector3(0, 0, 180 + sitIndex * 90); }
/// <summary> /// 播放发牌动画 /// </summary> private IEnumerator PlaySendCardAnimator() { //发牌之前先回收之前的牌 foreach (BattleAreaItem areaItem in View.battleAreaItems) { areaItem.SaveAllCard(); } View.cardArrowIcon.SetActive(false); ResourcesMgr.Instance.RecoveryAll(); if (GlobalData.hasHeap) { foreach (BattleAreaItem areaItem in View.battleAreaItems) { BattleAreaUtil.InitHeapCard(areaItem, GlobalData.CardWare.Length); } } yield return(new WaitForSeconds(4f)); HideRotaeSaizi(); //Facade.SendNotification(NotificationConstant.HIDESAIZI); var selfInfoVO = battleProxy.playerIdInfoDic[playerInfoProxy.userID]; var sendStartIndex = (battleProxy.GetBankerPlayerInfoVOS2C().sit - selfInfoVO.sit + GlobalData.SIT_NUM) % GlobalData.SIT_NUM; for (int i = 0; i < View.battleAreaItems.Count; i++) { View.battleAreaItems[i].SetData(battleProxy.playerSitInfoDic[GlobalData.GetNextSit(selfInfoVO.sit, i)]); } int sendCount = Mathf.CeilToInt((float)GlobalData.PLAYER_CARD_NUM / GlobalData.SEND_SINGLE) * GlobalData.SIT_NUM; for (int i = 0; i < sendCount; i++) { GameMgr.Instance.StartCoroutine(View.battleAreaItems[(i + sendStartIndex) % GlobalData.SIT_NUM].PlaySendCardAnimator()); yield return(new WaitForSeconds(0.4f)); } yield return(new WaitForSeconds(0.5f)); for (int i = 0; i < View.battleAreaItems.Count; i++) { GameMgr.Instance.StartCoroutine(View.battleAreaItems[i].PlayCloseCardAction()); } yield return(new WaitForSeconds(0.83f)); ClientAIMgr.Instance.AIPutCard(); battleProxy.SetIsForbit(false); SendNotification(NotificationConstant.MEDI_BATTLE_PLAYACTTIP); }