예제 #1
0
    public void RemoveCard(CardAsset asset)
    {
        CardNameRibbon ribbonToRemove = _ribbons[asset];

        ribbonToRemove.SetQuantity(ribbonToRemove.Quantity - 1);

        if (NumberOfThisCardInDeck(asset) == 1)
        {
            _ribbons.Remove(asset);
            Destroy(ribbonToRemove.gameObject);
        }

        _deckList.Remove(asset);
        CheckDeckCompleteFrame();
        DeckBuildingScreen.Instance.CollectionBrowserScript.UpdateQuantitiesOnPage();
    }
예제 #2
0
    public void RemoveCard(CardAsset asset)
    {
        Debug.Log("InRemoveCard");
        CardNameRibbon ribbonToRemove = ribbons[asset];

        ribbonToRemove.SetQuantity(ribbonToRemove.Quantity - 1);

        if (NumberOfThisCardInDeck(asset) == 1)
        {
            ribbons.Remove(asset);
            Destroy(ribbonToRemove.gameObject);
        }

        deckList.Remove(asset);

        CheckDeckCompleteFrame();

        // update quantities of all cards that we currently show in the collection
        // this should be after deckList.Remove(asset); line to show correct quantities
        DeckBuildingScreen.Instance.CollectionBrowserScript.UpdateQuantitiesOnPage();
    }
예제 #3
0
    public void RemoveCard(CardAsset asset)
    {
        CardNameRibbon ribbonToRemove = ribbons [asset];

        ribbonToRemove.SetQuantity(ribbonToRemove.Quantity - 1);

        if (NumberOfThisCardInDeck(asset) == 1)
        {
            ribbons.Remove(asset);
            Destroy(ribbonToRemove.gameObject);
        }

        //subtract from card count
        if (CardCount.Instance.count > 0)
        {
            CardCount.Instance.count--;
            CardCount.Instance.SetCountText();
        }
        deckList.Remove(asset);

        //update quantities of all cards taht we currently show in the collection
        CCScreen.Instance.CollectionBrowserScript.UpdateQuantitiesOnPage();
    }