public void EnableChoice() { CurStep = eCHOICE_STEP.None; ViewSelectIndex = -1; ThrowSelectIndex = -1; gameObject.SetActive(true); ThrowText.SetActive(true); OpenText.SetActive(false); for (int i = CardList.Count - 1; i >= 0; --i) { Destroy(CardList[i].gameObject); } CardList.Clear(); PlayerBase player = GameSingleton.GetPlay().ToSevenPoker().GetMyPlayer(); var list = player.CardList; assert.set(list.Count == 4); for (int i = 0; i < list.Count; ++i) { CardInfo_Trump info = new CardInfo_Trump(); info.Clone(list[i]); info.EnableSelectBtn = true; Card_Base cardClass = GameSingleton.GetPlay().CreateCard(CardSetTr, info); cardClass.SetSelectBtnDelegate(OnClick_ChoiceCard, i); cardClass.ToTrump().SetBackBtnDelegate(OnClick_ChoiceCard, i); CardList.Add(cardClass); } }
// =========================================================================== // // 카드 배분 // // =========================================================================== IEnumerator CardShareCoroutine(PlayTypes.SevenPokerStep CompleteStep) { PlayerBase CurPlayer = GetMasterPlayer(); while (RecvCardShareQueue.Count > 0) { CardInfo_Trump info = RecvCardShareQueue.Dequeue(); _CardShareToPlayer(info, CurPlayer, GetBoard().ToSevenPoker().GetDealerPosition(), 0.3f); yield return(new WaitForSeconds(0.2f)); CurPlayer = CurPlayer.GetNextPlayPlayer(); } if (CompleteStep != PlayTypes.SevenPokerStep.None) { yield return(new WaitForSeconds(0.1f)); SetStep_Scene(CompleteStep); } }
public void Send_PlayReady() { if (IsOnline() == false) { List <CardInfo_Trump> cardList = new List <CardInfo_Trump>(); for (int cardNum = 0; cardNum < 4; ++cardNum) { foreach (PlayerBase player in PlayerList) { if (player.IsPlay()) { CardInfo_Trump cardInfo = new CardInfo_Trump(); cardInfo.CardView = PlayTypes.CardView.Back; cardInfo.Number = Random.Range(1, 14); cardInfo.Mark = (PlayTypes.TrumpMark)Random.Range(0, 4); cardList.Add(cardInfo); } } } RecvChoiceCard(cardList); } }