Пример #1
0
    public void ShowHiddenCard(int cardID)
    {
        CardBase cb = AllCards[cardID];

        if (!AllShownCards.ContainsKey(cardID))
        {
            AllShownCards.Add(cardID, cb);
            AllCardContainers[cardID].gameObject.SetActive(true);
        }
    }
Пример #2
0
    public void ShowNewCardNotice()
    {
        foreach (KeyValuePair <int, CardBase> kv in AllCards)
        {
            kv.Value.SetBannerType(CardNoticeComponent.BannerTypes.None);
            kv.Value.SetArrowType(CardNoticeComponent.ArrowTypes.None);
        }

        foreach (int cardID in StoryManager.Instance.JustGetNewCards)
        {
            if (AllShownCards.ContainsKey(cardID))
            {
                AllCards[cardID].SetBannerType(CardNoticeComponent.BannerTypes.None);
                AllCards[cardID].SetArrowType(CardNoticeComponent.ArrowTypes.StorageIncrease);
            }
            else
            {
                AllCards[cardID].SetBannerType(CardNoticeComponent.BannerTypes.NewCard);
                AllCards[cardID].SetArrowType(CardNoticeComponent.ArrowTypes.None);
            }
        }
    }
Пример #3
0
    public void SetCardLimit(SortedDictionary <int, int> cardLimits)
    {
        foreach (KeyValuePair <int, int> kv in cardLimits)
        {
            int CardID         = kv.Key;
            int CardLimitCount = kv.Value;

            if (AllCards.ContainsKey(CardID))
            {
                CardBase cb = AllCards[CardID];
                cb.ChangeCardSelectLimit(CardLimitCount);

                if (!AllShownCards.ContainsKey(CardID))
                {
                    if (CardLimitCount > 0)
                    {
                        AllShownCards.Add(CardID, cb);
                        AllCardContainers[CardID].gameObject.SetActive(true);
                    }
                    else
                    {
                        AllCardContainers[CardID].gameObject.SetActive(false);
                    }
                }
                else
                {
                    if (CardLimitCount == 0)
                    {
                        AllCardContainers[CardID].gameObject.SetActive(false);
                        AllShownCards.Remove(CardID);
                    }
                }
            }
        }

        HideHigherLevelNumCardsForStoryMode();
    }