private void DisplayCurrentDecks() { nothingToDisplay.gameObject.SetActive(CollectionManager.currentDecks.Count == 0); nothingToDisplay.text = "No Decks to Display, create a new deck!"; foreach (CardDeck cardDeck in CollectionManager.currentDecks) { MinimalDeckDisplayController existingDeckDisplay = deckDisplays.Find(x => x.deck == cardDeck); if (deckDisplays.Count == 0 || existingDeckDisplay == null) { MinimalDeckDisplayController deckDisplay = Instantiate(minimalDeckDisplayControllerPrefab, deckDisplayScrollRect.content); deckDisplay.Initialize(cardDeck, OnMinimalDeckDisplayClicked); deckDisplays.Add(deckDisplay); } else { existingDeckDisplay.gameObject.SetActive(true); } } }
private void OnMinimalDeckDisplayClicked(MinimalDeckDisplayController display) { OpenDeck(display.deck); }