private void ShowConfirmUpgradeView(PerkVO perkData) { this.showPerkUpgradeAfterCelebration = false; PerkUpgradeConfirmState state = PerkUpgradeConfirmState.Unlocked; PerkManager perkManager = Service.PerkManager; Squad squad = Service.CurrentPlayer.Squad; if (squad == null) { return; } Dictionary <string, string> available = squad.Perks.Available; int level = squad.Level; if (perkManager.IsPerkLevelLocked(perkData, level)) { state = PerkUpgradeConfirmState.Locked; } else if (perkManager.IsPerkMaxTier(perkData) && available.ContainsValue(perkData.Uid)) { state = PerkUpgradeConfirmState.MaxTier; } this.lastGridPosition = this.perkGrid.GetCurrentScrollPosition(true); this.baseView.Visible = false; this.confirmInfoView = new SquadScreenConfirmPerkUpgradeView(perkData, this.screen, state, new Action(this.OnConfirmClosed)); this.confirmInfoView.Show(); }
public SquadScreenConfirmPerkUpgradeView(PerkVO perkData, SquadSlidingScreen screen, PerkUpgradeConfirmState state, Action onCloseCB) { this.perkToInvestIn = perkData; this.squadScreen = screen; this.viewState = state; this.onCloseCB = onCloseCB; this.InitUI(); }