private IEnumerator ProgressCard(Card _card) { //폭탄이 돼서 덱카드를 뒤집어야하는 상황 if (_card.infomation.kind == Infomation.Kind.None) { TurnEnd(); players[gameState.whosTurn].bombBackCard.RemoveBackCard(_card); players[gameState.whosTurn].myCardList.Remove(_card); } else { yield return(StartCoroutine(bomb.CheckBomb(_card, badak.badakCardList))); foreach (var item in bomb.bombCardList) { //MyTurnEnd 를 한번만 호출하기 위해서 if (item.Equals(bomb.bombCardList.Last())) { badak.SortingBadakCardList(item, TurnEnd); players[gameState.whosTurn].haveCardSlotManager.ReceiveHaveCards(item, badak, players[gameState.whosTurn].haveCardSlotManager.ReceiveMyCard); } else { badak.SortingBadakCardList(item); } players[gameState.whosTurn].myCardList.Remove(item); } } players[gameState.whosTurn].SortMyCard(); //현재 카드 개수를 알아야 막판에 쪽, 따닥, 판쓸, 뻑을 넘긴다 gameState.cardCount = players[gameState.whosTurn].myCardList.Count; }
private IEnumerator Distribution() { for (int i = 0; i < 2; i++) { //바닥 카드 for (int j = 0; j < 4; j++) { Card _badakCard = deckCards.Pop(); badak.SortingBadakCardList(_badakCard); yield return(new WaitForSeconds(0.3f)); } //선 카드 for (int k = 0; k < 5; k++) { Card _card = deckCards.Pop(); if (players[gameState.first].state == SlotPosition.State.Me) { players[gameState.first].ReceiveMyCard(_card, Card.SlotSate.Me); } else { players[gameState.first].ReceiveMyCard(_card, Card.SlotSate.You); } yield return(new WaitForSeconds(0.3f)); } //후 카드 { for (int l = 0; l < 5; l++) { Card _card = deckCards.Pop(); if (players[gameState.second].state == SlotPosition.State.Me) { players[gameState.second].ReceiveMyCard(_card, Card.SlotSate.Me); } else { players[gameState.second].ReceiveMyCard(_card, Card.SlotSate.You); } yield return(new WaitForSeconds(0.3f)); } } } gameState.state = GameState.State.GamePlaying; }