public void SetFaction(Faction newFaction) { //Debug.Log("NewGameFactionPanelController.SetFaction(" + newFaction.DisplayName + ")"); // deselect old button if (selectedFactionButton != null && selectedFactionButton.Faction != newFaction) { selectedFactionButton.DeSelect(); selectedFactionButton.UnHighlightBackground(); } // select new button for (int i = 0; i < optionButtons.Count; i++) { if (optionButtons[i].Faction == newFaction) { selectedFactionButton = optionButtons[i]; uINavigationControllers[0].SetCurrentIndex(i); optionButtons[uINavigationControllers[0].CurrentIndex].HighlightBackground(); } } ShowAbilityRewards(); ShowTraitRewards(); }
public void ShowFaction(NewGameFactionButton factionButton) { //Debug.Log("LoadGamePanel.ShowSavedGame()"); if (selectedFactionButton != null && selectedFactionButton != this) { selectedFactionButton.DeSelect(); } selectedFactionButton = factionButton; faction = factionButton.Faction; ShowAbilityRewards(); ShowTraitRewards(); }