Пример #1
0
    /// <summary>
    ///
    /// Selects the card in hand
    ///
    /// </summary>
    public void SelectDisplay()
    {
        //Sets the card being selected to the opposite of its current state
        isSelected = !isSelected;

        //Moves the card in or out depending on its state
        MoveCard(isSelected);

        //Only shows the buttons if there is a card display object (not an upgrade display)
        if (CardDisplay != null)
        {
            if (GameManager.instance.CurrentGamePhase == GameManager.GamePhases.Gameplay)
            {
                buttonGroup.gameObject.SetActive(isSelected);
            }
        }

        //If the card is being selected, updates all other cards in hand to minimise
        if (isSelected)
        {
            HandUI.MinimiseNonSelectedCards(HandIndex);
        }

        //Hides the hand count area based on whether the card is selected or not
        HandUI.UpdateHandObjects(isSelected);
    }