public void UpgradeClicked(int upgradeId) { if (isAddingUpgrade == true) { ClearState(); build.AddUpgrade(uniquePilotId, upgradeId); SquadsPage squadsPage = (SquadsPage)Pages.pages[PageName.Squads]; UpgradeModifiers.AddUpgrade(build, uniquePilotId, upgradeId); NavigationService.Navigate(squadsPage); } }
public void PilotClicked(int pilotId) { if (isAddingPilot == true) { ClearState(); build.AddPilot(pilotId); SquadsPage squadsPage = (SquadsPage)Pages.pages[PageName.Squads]; NavigationService.Navigate(squadsPage); } else if (isSwappingPilot == true) { ClearState(); int uniquePilotId = build.AddPilot(pilotId); build.GetPilot(uniquePilotId).upgrades = pilotToSwap.upgrades; Upgrades.RemoveUnusableUpgrades(build, build.GetPilot(uniquePilotId).id); build.RemovePilot(pilotToSwap.id); SquadsPage squadsPage = (SquadsPage)Pages.pages[PageName.Squads]; NavigationService.Navigate(squadsPage); } }