public void setToCard(CardData card, DeckBuilderDeck deck) { cardNameText.text = card.cardName; amount = 0; incrementAmount(); if (card.elementalIdentity == ElementIdentity.Earth) { setBackgroundColor(earthColor); } else if (card.elementalIdentity == ElementIdentity.Fire) { setBackgroundColor(fireColor); } else if (card.elementalIdentity == ElementIdentity.Water) { setBackgroundColor(waterColor); } else if (card.elementalIdentity == ElementIdentity.Wind) { setBackgroundColor(windColor); } else if (card.elementalIdentity == ElementIdentity.Nuetral) { setBackgroundColor(nuetralColor); } else { Debug.LogError(card.elementalIdentity); } minusButton.cardId = card.id; minusButton.deck = deck; plusButton.cardId = card.id; plusButton.deck = deck; cardNameBox.cardId = card.id; Debug.Log("Setting up card in deck builder"); }
private void Start() { instance = this; deckNameField.characterLimit = 22; load(PlayerPrefs.GetString(PlayerPrefEnum.mostRecentDeckName, null)); }