//广播抢地主结果 public static void RobLanlordResult(this JoyLdsRoom joyLdsRoom, int seatIndex, bool isApproval) { joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_RobLanlord() { SeatIndex = seatIndex, Result = isApproval }); }
//广播玩家不出牌的消息 public static void DontPlayBroadcast(this JoyLdsRoom joyLdsRoom, int seatIndex) { joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_DontPlay() { SeatIndex = seatIndex }); }
//广播可以抢地主消息 public static void CanRobLanlordBroadcast(this JoyLdsRoom joyLdsRoom, int seatIndex) { joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_CanRobLanlord() { SeatIndex = seatIndex }); joyLdsRoom.CurrBeOperationSeatIndex = seatIndex; }
//广播玩家可以出牌的消息 public static void CanPlayCardBroadcast(this JoyLdsRoom joyLdsRoom, int seatIndex, bool isFirst) { joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_CanPlayCard() { SeatIndex = seatIndex, IsFirst = isFirst }); joyLdsRoom.CurrBeOperationSeatIndex = seatIndex; }
//广播玩家出牌消息 public static void PlayCardBroadcast(this JoyLdsRoom joyLdsRoom, int seatIndex, int playCardType, RepeatedField <int> playCards) { Actor_JoyLds_PlayCard actorJoyLdsPlayCard = new Actor_JoyLds_PlayCard(); actorJoyLdsPlayCard.SeatIndex = seatIndex; actorJoyLdsPlayCard.PlayCardType = playCardType; actorJoyLdsPlayCard.Cards = playCards; actorJoyLdsPlayCard.Hands.Add(joyLdsRoom.pJoyLdsPlayerDic[seatIndex].pHnads); joyLdsRoom.BroadcastMssagePlayers(actorJoyLdsPlayCard); }
//广播确定阵营消息 public static void ConfirmCampBroadcast(this JoyLdsRoom joyLdsRoom, int landlordSeatIndex, RepeatedField <int> ldsHands, RepeatedField <int> threeCards) { RepeatedField <int> newLdsHands = new RepeatedField <int>() { ldsHands.ToArray() }; joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_ConfirmCamp() { LandlordSeatIndex = landlordSeatIndex, SeatIndex = landlordSeatIndex, Hands = newLdsHands, LandlordThreeCard = threeCards }); joyLdsRoom.LandlordSeatIndex = landlordSeatIndex; }
//重新发牌 public static void AnewDealBroadcast(this JoyLdsRoom joyLdsRoom) { joyLdsRoom.Reset(); //重置一下游戏数据 joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_AnewDeal()); //要重新发牌的 消息 joyLdsRoom.Deal(); //发牌 }
//广播结算消息 public static void GameResultBroadcast(this JoyLdsRoom joyLdsRoom, Actor_JoyLds_GameResult actorJoyLdsGameResult) { joyLdsRoom.BroadcastMssagePlayers(actorJoyLdsGameResult);//广播游戏结算的消息 }
//广播房间解散的消息 public static void DissolveRoomBroadcast(this JoyLdsRoom joyLdsRoom) { joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_DissolveRoom()); joyLdsRoom.Dispose(); }