/// <summary>
        /// 出牌
        /// </summary>
        private async void OnPlay()
        {
            CardHelper.Sort(currentSelectCards);
            Actor_GamerPlayCard_Req request = new Actor_GamerPlayCard_Req();

            request.Cards.AddRange(currentSelectCards);
            Actor_GamerPlayCard_Ack response = await SessionComponent.Instance.Session.Call(request) as Actor_GamerPlayCard_Ack;

            //出牌错误提示
            GamerUIComponent gamerUI = Game.Scene.GetComponent <UIComponent>().Get(UIType.LandlordsRoom).GetComponent <GamerComponent>().LocalGamer.GetComponent <GamerUIComponent>();

            if (response.Error == ErrorCode.ERR_PlayCardError)
            {
                gamerUI.SetPlayCardsError();
            }
        }
예제 #2
0
        /// <summary>
        /// 出牌
        /// </summary>
        private async void OnPlay()
        {
            CardHelper.Sort(currentSelectCards);
            C2M_GamerPlayCard request = new C2M_GamerPlayCard()
            {
                Cards = currentSelectCards.ToArray()
            };
            M2C_GamerPlayCard response = await SessionWrapComponent.Instance.Session.Call(request) as M2C_GamerPlayCard;

            //出牌错误提示
            GamerUIComponent gamerUI = Game.Scene.GetComponent <UIComponent>().Get(UIType.UIRoom).GetComponent <GamerComponent>().LocalGamer.GetComponent <GamerUIComponent>();

            if (response.Error == ErrorCode.ERR_PlayCardError)
            {
                gamerUI.SetPlayCardsError();
            }
        }