예제 #1
0
 //广播抢地主结果
 public static void RobLanlordResult(this JoyLdsRoom joyLdsRoom, int seatIndex, bool isApproval)
 {
     joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_RobLanlord()
     {
         SeatIndex = seatIndex, Result = isApproval
     });
 }
예제 #2
0
 //广播玩家不出牌的消息
 public static void DontPlayBroadcast(this JoyLdsRoom joyLdsRoom, int seatIndex)
 {
     joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_DontPlay()
     {
         SeatIndex = seatIndex
     });
 }
예제 #3
0
 //广播可以抢地主消息
 public static void CanRobLanlordBroadcast(this JoyLdsRoom joyLdsRoom, int seatIndex)
 {
     joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_CanRobLanlord()
     {
         SeatIndex = seatIndex
     });
     joyLdsRoom.CurrBeOperationSeatIndex = seatIndex;
 }
예제 #4
0
 //广播玩家可以出牌的消息
 public static void CanPlayCardBroadcast(this JoyLdsRoom joyLdsRoom, int seatIndex, bool isFirst)
 {
     joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_CanPlayCard()
     {
         SeatIndex = seatIndex, IsFirst = isFirst
     });
     joyLdsRoom.CurrBeOperationSeatIndex = seatIndex;
 }
예제 #5
0
        //广播玩家出牌消息
        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);
        }
예제 #6
0
        //广播确定阵营消息
        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;
        }
예제 #7
0
 //重新发牌
 public static void AnewDealBroadcast(this JoyLdsRoom joyLdsRoom)
 {
     joyLdsRoom.Reset();                                             //重置一下游戏数据
     joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_AnewDeal()); //要重新发牌的 消息
     joyLdsRoom.Deal();                                              //发牌
 }
예제 #8
0
 //广播结算消息
 public static void GameResultBroadcast(this JoyLdsRoom joyLdsRoom,
                                        Actor_JoyLds_GameResult actorJoyLdsGameResult)
 {
     joyLdsRoom.BroadcastMssagePlayers(actorJoyLdsGameResult);//广播游戏结算的消息
 }
예제 #9
0
 //广播房间解散的消息
 public static void DissolveRoomBroadcast(this JoyLdsRoom joyLdsRoom)
 {
     joyLdsRoom.BroadcastMssagePlayers(new Actor_JoyLds_DissolveRoom());
     joyLdsRoom.Dispose();
 }