コード例 #1
0
    public void SetupDrawDeck()
    {
        Debug.Log("Player: Creating ConvoCards...");
        foreach (ConvoCardData convoData in _convoDeck.ConvoDeckConfig)
        {
            ConvoCard newConvoCard = new ConvoCard(convoData);
            _drawDeck.Add(newConvoCard);
        }
        Debug.Log("Player: Creating EnviroCards...");
        foreach (EnviroCardData enviroData in _enviroDeck.EnviroDeckConfig)
        {
            EnviroCard newEnviroCard = new EnviroCard(enviroData);
            _drawDeck.Add(newEnviroCard);
        }

        Debug.Log("Player: Shuffling...");
        AudioHelper.PlayClip2D(_shuffleAudio, 1f);
        for (int i = 0; i < _shuffles; i++)
        {
            _drawDeck.Shuffle();
        }
        _drawDeckView.Display(_drawDeck);
        _discardDeckView.DisplayNull();
        _currentCardView.DisplayNull();
    }
コード例 #2
0
 public void Display(ConvoCard convoCard)
 {
     _nameText.text        = convoCard.Name;
     _graphicUI.sprite     = convoCard.Graphic;
     _descriptionText.text = convoCard.Description;
     _bgColor       = convoCard.Color;
     _bgImage.color = _bgColor;
 }
コード例 #3
0
    public void SetupDrawDeck()
    {
        Debug.Log("Date: Creating ConvoCards...");
        foreach (ConvoCardData convoData in _convoDeck.ConvoDeckConfig)
        {
            ConvoCard newConvoCard = new ConvoCard(convoData);
            _drawDeck.Add(newConvoCard);
        }
        Debug.Log("Date: Creating EnviroCards...");
        foreach (EnviroCardData enviroData in _enviroDeck.EnviroDeckConfig)
        {
            EnviroCard newEnviroCard = new EnviroCard(enviroData);
            _drawDeck.Add(newEnviroCard);
        }

        Debug.Log("Date: Shuffling...");
        for (int i = 0; i < _shuffles; i++)
        {
            _drawDeck.Shuffle();
        }
    }
コード例 #4
0
 private void Start()
 {
     _card = new ConvoCard(_cardData);
 }