public void SelectMinionByCode(MinionType type = MinionType.Runner) { MinionInShop m = null; float i = 0; foreach (var item in _scrollContentList) { if (item.minionType == type) { m = item; break; } i += 1; } if (m == null) { return; } m.button.onClick.Invoke(); ShowItemInScroller(i); }
void CheckScrollItemPadlock(MinionStoreData storeDataDef, MinionInShop button) { if (_user.LevelProgressManager.GetStarsAccumulated() < storeDataDef.starsNeedToUnlock) { button.LockButton(); } else { button.UnlockButton(); } }