Example #1
0
        /// <summary>
        /// 提示
        /// </summary>
        private async void OnPrompt()
        {
            Actor_GamerPrompt_Req  request  = new Actor_GamerPrompt_Req();
            Actor_GamerPrompt_Back response = (Actor_GamerPrompt_Back)await SessionComponent.Instance.Session.Call(request);

            HandCardsComponent handCards = LandRoomComponent.LocalGamer.GetComponent <HandCardsComponent>();

            //清空当前选中
            while (currentSelectCards.Count > 0)
            {
                Card selectCard = currentSelectCards[currentSelectCards.Count - 1];
                handCards.GetSprite(selectCard).GetComponent <HandCardSprite>().OnClick(null);
            }

            //自动选中提示出牌
            if (response.Cards != null)
            {
                for (int i = 0; i < response.Cards.Count; i++)
                {
                    handCards.GetSprite(response.Cards[i]).GetComponent <HandCardSprite>().OnClick(null);
                }
            }
        }