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)
 {
     //if (newCharacterClass != null && SystemConfigurationManager.MyInstance.NewGameClass == true) {
     if (SystemConfigurationManager.MyInstance.NewGameClass == true)
     {
         characterClassLabel.SetActive(true);
         characterClassButton.gameObject.SetActive(true);
         characterClassButton.AddCharacterClass(newCharacterClass);
     }
     else
     {
         characterClassLabel.SetActive(false);
         characterClassButton.gameObject.SetActive(false);
     }
 }
Exemple #3
0
        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();
            }
        }