private void UpdateView() { levelTexts.ToList().ForEach(t => t.text = level.ToString()); BosUtils.If(() => IsUnlocked, () => { unlockedView.Activate(); BosUtils.MakeList(nextLevelView, lockedView).ForEach(v => v.Deactivate()); }, () => { BosUtils.If(() => level == Services.BankService.NextLevel, () => { nextLevelView.Activate(); BosUtils.MakeList(lockedView, unlockedView).ForEach(v => v.Deactivate()); }, () => { lockedView.Activate(); BosUtils.MakeList(unlockedView, nextLevelView).ForEach(v => v.Deactivate()); }); }); }
private void UpdateButtonInteractability() { BosUtils.If(() => Services.PlayerService.IsEnoughCoins(enhancedManagerData.generator.Data.EnhancePrice), trueAction: () => enhanceButton.interactable = true, falseAction: () => enhanceButton.interactable = false); }