Example #1
0
    private void ManipulateDisplayingInfo(ItemVariant var)
    {
        if (shopManager.CheckIfItemIsBought(itemCFG, var) /* || var.cost == 0*/)
        {
            buyButton.SetActive(false);
            itemBoughtTab.SetActive(true);
            // donebutton on
            doneButton.SetActive(true);
/*            Debug.Log("SHOW DONE BUTTON!!!!");*/
        }
        else
        {
            buyButton.SetActive(true);
            itemBoughtTab.SetActive(false);
            //donebutton off
            doneButton.SetActive(false);
        }



        if (SaveManager.Instance.LoadClothesSet(previewManager.GetCurrentKey()).ItemAndVarIsInConfig(itemCFG, var))
        {
            doneButton.SetActive(false);
        }


        variantCostText.text = var.cost.ToString();

        variantCurrencyIMG.sprite = var.currencyType == CurrencyType.HARD ? hardCurrencySprite
            : softCurrencySprite;

        variantNameIDtext.text  = var.ConfigId;
        varDescriptionText.text = var.description;
    }
Example #2
0
    private void OnItemPicked(ItemConfig cfg)
    {
        var activeVar = SaveManager.Instance.LoadClothesSet(previewManager.GetCurrentKey()).GetActiveVariant(cfg);

        bool isActive = activeVar == variant ? true : false;

        activeTick.SetActive(isActive);
    }