private void OnSummonComplete(Hero summonedHero) { _summonButtons.ForEach(choice => choice.btn.interactable = true); //Crystal.DOColor(new Color(1f, 1f, 1f, 0f), 0.5f); _currentChoice.UpdateCounter(); btnBack.interactable = true; }
// Use this for initialization void Start() { foreach (var kv in scrollsSprite) { CurrencyTypes currency = kv.Key; SummonInfo info = kv.Value; SummonButtonContainer summonChoice = this.Clone <SummonButtonContainer>(BtnSummonTemplate); summonChoice.btn.onClick.AddListener(() => BtnAction_Summon(summonChoice)); summonChoice.label.text = info.label + " SUMMON"; summonChoice.icon.sprite = info.sprite; summonChoice.currency = currency; summonChoice.summonType = CurrencyManager.ConvertCurrencyToSummonType(currency); summonChoice.UpdateCounter(); _summonButtons.Add(summonChoice); } BtnSummonTemplate.SetActive(false); PlayerManager.signals.OnChangedCurrency += OnChangedCurrency; }