Example #1
0
        public void NotifyTrunPlayer(int liftTime)
        {
            Actor_DDZTurnPlayer_Ntt trunMessgae = new Actor_DDZTurnPlayer_Ntt()
            {
                LeftTime  = liftTime,
                OperateId = opIndex,
                RoomId    = roomBehaiorCpt.parent.RoomId,
                State     = gameStatus,
            };

            roomBehaiorCpt.BroadcastAll(trunMessgae);
        }
Example #2
0
        /// <summary>
        /// 玩家轮循广播
        /// </summary>
        /// <param name="resp"></param>
        public async void DDZTurnPlayer_Ntt(Actor_DDZTurnPlayer_Ntt resp)
        {
            //剩余时间
            DDZGameConfigComponent.Instance.ActiveOpTime = resp.LeftTime;

            //判断当前游戏状态
            if (resp.State == (int)DDZ_GameState.CallScore)
            {
                Log.Debug("游戏状态:抢地主");

                int realSeatID = DDZGameHelper.ChangeSeat(resp.OperateId);

                if (realSeatID == 0)
                {
                    this.DDZCallScorePlugin.Show(resp.LeftTime);
                }

                //高亮显示头像
                DDZGameConfigComponent.Instance.ActiveChairId = resp.OperateId;
            }
            else if (resp.State == (int)DDZ_GameState.DaPai)
            {
                Log.Debug("游戏状态:出牌");

                int realSeatID = DDZGameHelper.ChangeSeat(resp.OperateId);

                //清除之前出牌界面
                this.DDZOutCardPlugin.ClearByIndex(realSeatID);

                if (realSeatID == 0)
                {
                    //弹出交互操作BAR
                    this.DDZInteractivePlugin.Show(resp.LeftTime);
                }

                //高亮显示头像
                DDZGameConfigComponent.Instance.ActiveChairId = resp.OperateId;

                //隐藏操作提示

                this.DDZOpTipPlugin.HideByIndex(realSeatID);

                //检测连续两个都是不出,则清屏
                await Task.Delay(200);

                this.DDZOpTipPlugin.CheckClearALL(realSeatID);
            }
            else if (resp.State == (int)DDZ_GameState.JieSuan)
            {
                Log.Debug("游戏状态:结算");
            }
        }