void ServerPlayCards() { if (PlayCards.Count > 0) { for (int i = 0; i < PlayCards.Count; i++) { CardStruct card = PlayCards[i]; for (int j = 0; j < HaveCards.Count; j++) { CardStruct playCard = HaveCards[j]; if (playCard.UID == card.UID) { HaveCards.RemoveAt(j); NetworkGameMgr.Instance.PlayCard(playCard); //更新牌桌上的显示 NetworkGameMgr.Instance.MyCardsMgr.Rpc_UpdateCardToTable(playCard); } } } //更新卡牌显示 Rpc_SetCardsNumb(HaveCards.Count); NetworkGameMgr.Instance.MyCardsMgr.Rpc_UpdateCardNumbers(); //更新下一个可行动的玩家 NetworkGameMgr.Instance.UpdateCurPlayerIndex(); } }
public void RemoveCard_toPlayCards(CardStruct card) { for (int i = 0; i < PlayCards.Count; i++) { CardStruct item = PlayCards[i]; if (item.UID == card.UID) { PlayCards.RemoveAt(i); MyUIMain.SetLabelChooseCards(PlayCards.Count); return; } } }