public void SetPrices(ModuleCardsCompositionComponent moduleResourcesComponent)
 {
     this.enoughCards = true;
     for (int i = 0; i < this.prices.Length; i++)
     {
         this.resourceCountTexts[i].gameObject.SetActive(false);
         this.spacingObjects[i].SetActive(false);
         this.prices[i] = 0;
     }
     this.SetPrice(0x1e0f3L, (long)moduleResourcesComponent.CraftPrice.Cards);
 }
Exemplo n.º 2
0
        private void SetModuleLevel(ModuleCardItemUIComponent moduleCardItemUi, ModuleUpgradeLevelComponent moduleUpgradeLevel, ModuleCardsCompositionComponent moduleCardsComposition, Optional <ModuleCardNode> moduleCards)
        {
            int level = (int)moduleUpgradeLevel.Level;

            moduleCardItemUi.Level = level + 1;
            List <ModulePrice> upgradePrices = moduleCardsComposition.UpgradePrices;

            moduleCardItemUi.MaxCardsCount = (level >= upgradePrices.Count) ? 0 : upgradePrices[level].Cards;
            moduleCardItemUi.CardsCount    = !moduleCards.IsPresent() ? 0 : ((int)moduleCards.Get().userItemCounter.Count);
        }