//to drop card
 public void ConfirmDropButton()
 {
     // Debug.Log("Drop button clicked");
     if (selectedCard != null || selectedCards != null)
     {
         foreach (Card selCard in selectedCards)
         {
             leastCountManager.DropCardsFromPlayer(currentTurnPlayer, selCard);
             Debug.Log("Card Player" + currentTurnPlayer + "," + selCard);
             cardAnimator.DropCardAnimation(selectedCard, leastCountManager.GetDroppedCardsCount());
             currentTurnPlayer.DropCardFromPlayer(cardAnimator, selectedCard.GetValue(), true);
         }
         leastCountManager.RepositionDroppedCards(cardAnimator);
         move.droppedCards = selectedCard.GetValue();
         gameState         = GameState.TurnConfirmDroppingCard;
         // Debug.Log("Card Droped");
         // Debug.Log("Card Droped selectedCard" + selectedCard);
         // Debug.Log("Card Droped selectedCard GetDroppedCardsCount" + leastCountManager.GetDroppedCardsCount());
         GameFlow();
     }
     else
     {
         SetMessage("Select a card from your deck and click confirm");
     }
 }
Example #2
0
 //
 public void ConfirmDropButton()
 {
     if (selectedCard != null)
     {
         leastCountManager.DropCardsFromPlayer(currentTurnPlayer, selectedCard);
         cardAnimator.DropCardAnimation(selectedCard, leastCountManager.GetDroppedCardsCount(), currentTurnPlayer);
         currentTurnPlayer.DropCardFromPlayer(cardAnimator, selectedCard.GetValue(), true);
         leastCountManager.RepositionDroppedCards(cardAnimator);
         move.droppedCards = selectedCard.GetValue();
         gameState         = GameState.TurnConfirmDroppingCard;
         GameFlow();
     }
     else
     {
         SetMessage("Select a card from your deck and click confirm");
     }
 }