Exemplo n.º 1
0
 //****************** Helper Methods *********************//
 public void ResetSelectedCard()
 {
     if (selectedCard != null)
     {
         selectedCard.OnSelectedTransform(false);
         selectedCard = null;
         selectedRank = 0;
     }
 }
Exemplo n.º 2
0
        //****************** User Interaction *********************//
        public void OnCardSelected(Card card)
        {
            if (gameState == GameState.TurnSelectingNumber)
            {
                if (card.OwnerId == currentTurnPlayer.PlayerId)
                {
                    if (selectedCard != null)
                    {
                        selectedCard.OnSelectedTransform(false);
                        selectedRank = 0;
                    }

                    selectedCard = card;
                    selectedRank = selectedCard.Rank;
                    selectedCard.OnSelectedTransform(true);
                    //selectedCard.transform.position = new Vector3(selectedCard.transform.position.x, selectedCard.transform.position.y + 1f, selectedCard.transform.position.z);
                    SetMessage($"Ask for {selectedCard.Rank}s ?");
                    ChoseThePlayerCardButtonPanel.SetActive(true);  //testing
                    gameState = GameState.TurnSelectingPlayer;      //testing
                }
            }
        }