public void AddCard(CardSelectorView selector, string cardId)
        {
            cardSelectorScroll.AutoFocus(selector.SelectorTransform, out Vector2 selectorFinalPosition);
            IShowable showablewCard = cardManager.GetDeckCard(cardId);

            Move(showablewCard, selectorFinalPosition);
        }
        public CardSelectorView SetCardInSelector(CardInfo cardRow, Investigator investigator)
        {
            CardSelectorView selector = cardSelectorsManager.GetSelectorByCardIdOrEmpty(cardRow.Id);
            int quantity = investigator.GetAmountOfThisCardInDeck(cardRow);

            selector.SetQuantity(quantity);
            SetSelector();
            if (quantity <= 0)
            {
                DesactivateSelector(selector);
            }
            return(selector);

            void SetSelector()
            {
                if (!selector.IsEmpty)
                {
                    return;
                }
                selector.SetSelector(cardRow.Id, imageCards.GetSprite(cardRow.Id));
                selector.SetName(cardRow.Name);
                selector.SetTransform(placeHolderZone);
                LayoutRebuilder.ForceRebuildLayoutImmediate(placeHolderZone);
            }
        }
        private void UpdateView(CardInfo card, Investigator investigator)
        {
            CardSelectorView selector = cardSelector.SetCardInSelector(card, investigator);

            cardShowerPresenter.AddCard(selector, card.Id);
            cardSelector.SetCanBeRemovedInSelectors(investigator.Id);
            deckCardPresenter.RefreshCardsSelectability();
            deckCardPresenter.SetQuantity(card);
            cardQuantityPresenter.Update(investigator);
            cardShowerPresenter.ReshowCardDeck(card.Id);
            buttonsPresenter.AutoActivateReadyButton();
        }
 private void DesactivateSelector(CardSelectorView selector)
 {
     selector.SetSelector(null);
     selector.SetTransform(selectorsZone);
 }