public void ShowOptionButtons() { //Debug.Log("NewGameClassPanelController.ShowOptionButtons()"); ClearOptionButtons(); for (int i = 0; i < newGameManager.CharacterClassList.Count; i++) { //Debug.Log("LoadGamePanel.ShowLoadButtonsCommon(): setting a button with saved game data"); GameObject go = objectPooler.GetPooledObject(buttonPrefab, buttonArea.transform); NewGameCharacterClassButton optionButton = go.GetComponent <NewGameCharacterClassButton>(); optionButton.Configure(systemGameManager); optionButton.AddCharacterClass(newGameManager.CharacterClassList[i]); optionButtons.Add(optionButton); uINavigationControllers[0].AddActiveButton(optionButton); if (newGameManager.CharacterClassList[i] == newGameManager.CharacterClass) { uINavigationControllers[0].SetCurrentIndex(i); } } /* * if (optionButtons.Count > 0) { * SetNavigationController(uINavigationControllers[0]); * } */ }
public void SetCharacterClass(CharacterClass newCharacterClass) { //Debug.Log("NewGameClassPanelController.SetCharacterClass()"); // deselect old button if (selectedClassButton != null && newCharacterClass != selectedClassButton.CharacterClass) { selectedClassButton.DeSelect(); selectedClassButton.UnHighlightBackground(); } // select new button for (int i = 0; i < optionButtons.Count; i++) { if (optionButtons[i].CharacterClass == newCharacterClass) { selectedClassButton = optionButtons[i]; uINavigationControllers[0].SetCurrentIndex(i); optionButtons[uINavigationControllers[0].CurrentIndex].HighlightBackground(); } } ShowAbilityRewards(); ShowTraitRewards(); }
public void ShowCharacterClass(NewGameCharacterClassButton classButton) { //Debug.Log("LoadGamePanel.ShowSavedGame()"); if (selectedClassButton != null && selectedClassButton != this) { selectedClassButton.DeSelect(); } selectedClassButton = classButton; characterClass = classButton.CharacterClass; ShowAbilityRewards(); ShowTraitRewards(); }
public void ShowOptionButtonsCommon() { //Debug.Log("LoadGamePanel.ShowLoadButtonsCommon()"); ClearOptionButtons(); foreach (CharacterClass characterClass in SystemCharacterClassManager.MyInstance.GetResourceList()) { if (characterClass.NewGameOption == true) { //Debug.Log("LoadGamePanel.ShowLoadButtonsCommon(): setting a button with saved game data"); GameObject go = Instantiate(buttonPrefab, buttonArea.transform); NewGameCharacterClassButton optionButton = go.GetComponent <NewGameCharacterClassButton>(); optionButton.AddCharacterClass(characterClass); optionButtons.Add(optionButton); } } if (optionButtons.Count > 0) { optionButtons[0].Select(); } }