Ejemplo n.º 1
0
        /// <summary>
        /// 全压 srcUid:全压发起人,nextOperationUid:下一操作的玩家uid,betGold:全压了多少金币,holdGold:全压之后剩余的金币,roomAllGold:房间当前所有金币
        /// </summary>
        public override void betAll(long srcUid, long nextOperationUid, long betGold, long holdGold, long roomAllGold)
        {
            //停止该玩家的progress
            if (srcUid != PlayerCache.loginInfo.uid)
            {
                PlayerCache.roomPlayerObjDic[srcUid].OtherPlayerAllIn();
                PlayerCache.roomPlayerObjDic[srcUid].AllInBet(betGold);
                PlayerCache.roomPlayerObjDic[srcUid].BetSuccess(holdGold);
            }
            UIZJHPanel zjhPanel = MessageManager.GetInstance.GetUIDict <UIZJHPanel>();

            if (zjhPanel == null)
            {
                zjhPanel = MessageManager.GetInstance.GetUIDict <CheatZjhPanel>();
            }
            if (zjhPanel != null)
            {
                zjhPanel.IsLimitTTL = true;
                zjhPanel.SetTotalGoldTxt(roomAllGold);
                //更新轮数
                if (srcUid == PlayerCache.firstBetPlayer)
                {
                    zjhPanel.UpdateRoundAndCinglTimes();
                }
            }

            //开启下一玩家的progress
            PlayerCache.CurrentTurnPlayerUid = nextOperationUid;
            PlayerCache.roomPlayerObjDic[nextOperationUid].PlayeProgressAni();
            if (nextOperationUid == PlayerCache.loginInfo.uid)
            {
                if (zjhPanel.isAutoFollow && !zjhPanel.isFinalAllIn)
                {
                    zjhPanel.AutoFollow();
                }
                else
                {
                    zjhPanel.ShowFinalAllInBtn();
                }
            }
        }