/// <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(); } }
/// <summary> /// 出牌 /// </summary> private async void OnPlay() { CardHelper.Sort(currentSelectCards); Actor_GamerPlayCard_Req request = new Actor_GamerPlayCard_Req(); foreach (var a in currentSelectCards) { request.Cards.Add(a); } Actor_GamerPlayCard_Back response = (Actor_GamerPlayCard_Back)await SessionComponent.Instance.Session.Call(request); //出牌错误提示 LandlordsGamerPanelComponent gamerUI = LandlordsRoomComponent.LocalGamer.GetComponent <LandlordsGamerPanelComponent>(); if (response.Error == ErrorCode.ERR_PlayCardError) { gamerUI.SetPlayCardsError(); } }