//出牌请求 public void RequestPlayCard(params object[] objs) { int thePlayCardType = PlayCardType.None; RepeatedField <int> pithCards = _joyLandlordsHandComponent.GetPithCards(); if (isFirstPlayCard) { thePlayCardType = JoyLdsGamePlayHandLogic.PlayerPlayHandIsRational(pithCards); } else { thePlayCardType = JoyLdsGamePlayHandLogic.PlayerPlayHandIsRational(UpPlayCardType, UpPlayCardArray, pithCards); } if (thePlayCardType != PlayCardType.None) { Actor_JoyLds_PlayCard actorJoyLdsPlayCard = new Actor_JoyLds_PlayCard() { Cards = pithCards, PlayCardType = thePlayCardType }; SessionComponent.Instance.Send(actorJoyLdsPlayCard as IMessage); } else { _joyLdsUserPlayer.ShowSlectHandFoulTextGo(); } }
//广播玩家出牌消息 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); }