示例#1
0
    public void SelectDeck(DeckIcon deck)
    {
        if (deck == null || selectedDeck == deck || !deck.DeckInformation.IsComplete())
        {
            portrait.gameObject.SetActive(false);
            selectedDeck = null;
            if (PlayButton != null)
            {
                PlayButton.interactable = false;
            }
        }
        else
        {
            portrait.charAsset = deck.DeckInformation.Character;
            portrait.ApplyLookFromAsset();
            portrait.gameObject.SetActive(true);
            selectedDeck = deck;
            // instantly load this information to our BattleStartInfo.
            BattleStartInfo.SelectedDeck = selectedDeck.DeckInformation;

            if (PlayButton != null)
            {
                PlayButton.interactable = true;
            }
        }
    }
示例#2
0
    public void SelectDeck(DeckIcon deck)
    {
        if (deck == null || SelectedDeck == deck || !deck.DeckInformation.IsComplete())
        {
            Portrait.gameObject.SetActive(false);
            SelectedDeck = null;

            if (PlayButton != null)
            {
                PlayButton.interactable = false;
            }
        }
        else
        {
            Portrait.charAsset = deck.DeckInformation.Character;
            Portrait.ApplyLookFromAsset();
            Portrait.gameObject.SetActive(true);
            SelectedDeck = deck;
            BattleStartInfo.SelectedDeck = SelectedDeck.DeckInformation;

            if (PlayButton != null)
            {
                PlayButton.interactable = true;
            }
        }
    }
示例#3
0
    public void SelectDeck(DeckIcon deck)
    {
        if (deck == null || selectedDeck == deck || !deck.DeckInfomation.IsComplete())
        {
            selectedDeck = null;
            if (PlayButton != null)
            {
                PlayButton.interactable = false;
            }

            Debug.Log("No deck was selected");
        }
        else
        {
            selectedDeck = deck;
            Debug.Log("deck selected: " + selectedDeck.DeckNameText.ToString());
            //load this information to BattleStartInfo
            BattleStartInfo.SelectedDeck = selectedDeck.DeckInfomation;

            if (PlayButton != null)
            {
                PlayButton.interactable = true;
            }
        }
    }