//玩家可以进行操作 public static void PlayerCanOperate(this FiveStarRoom fiveStarRoom, Actor_FiveStar_CanOperate actorFiveStarCanOperate) { if (!fiveStarRoom.CanOperatePlayerIndex.Contains(actorFiveStarCanOperate.SeatIndex)) { fiveStarRoom.CanOperatePlayerIndex.Add(actorFiveStarCanOperate.SeatIndex); fiveStarRoom.OverTime = fiveStarRoom.GetOverTime(actorFiveStarCanOperate.SeatIndex, FiveStarOverTimeType.OperateType); //超时时间 } fiveStarRoom.EndCanOperateAndCanChuMessage = actorFiveStarCanOperate; //记录最后一条玩家可操作消息 }
//通知所有玩家打漂 public static void BroadcastCanDaPiao(this FiveStarRoom fiveStarRoom) { fiveStarRoom.IsDaPiaoBeing = true; fiveStarRoom.OverTime = fiveStarRoom.GetOverTime(0, FiveStarOverTimeType.DaPiaoType);//获取超时时间 for (int i = 0; i < fiveStarRoom.FiveStarPlayerDic.Count; i++) { fiveStarRoom.FiveStarPlayerDic[i].AIDelayDaPiao();//AI延迟打漂 } fiveStarRoom.EntiretyOprationAleadyNum = 0; if (fiveStarRoom.RoomNumber == 4) { fiveStarRoom.EntiretyOprationAleadyNum++;//如果是4人 默认一个人已经做了操作 } fiveStarRoom.BroadcastMssagePlayers(new Actor_FiveStar_CanDaPiao() { MaxPiaoNum = fiveStarRoom.RoomConfig.MaxPiaoNum }); }
//玩家可以进行出牌操作 public static void PlayerCanChuPai(this FiveStarRoom fiveStarRoom, Actor_FiveStar_CanPlayCard actorFiveStarCan) { fiveStarRoom.OverTime = fiveStarRoom.GetOverTime(actorFiveStarCan.SeatIndex, FiveStarOverTimeType.PlayCardType); //获取超时时间 fiveStarRoom.CanPlayCardPlayerIndex = actorFiveStarCan.SeatIndex; fiveStarRoom.EndCanOperateAndCanChuMessage = actorFiveStarCan; //记录最后一条玩家可操作消息 }