public void ClearLabels() { factionLabel.SetActive(false); factionButton.gameObject.SetActive(false); if (systemConfigurationManager.NewGameFaction == true) { foreach (Faction faction in systemDataFactory.GetResourceList <Faction>()) { if (faction.NewGameOption == true) { factionLabel.SetActive(true); factionButton.gameObject.SetActive(true); break; } } } characterClassLabel.SetActive(false); characterClassButton.gameObject.SetActive(false); if (systemConfigurationManager.NewGameClass == true) { foreach (CharacterClass characterClass in systemDataFactory.GetResourceList <CharacterClass>()) { if (characterClass.NewGameOption == true) { characterClassLabel.SetActive(true); characterClassButton.gameObject.SetActive(true); break; } } } classSpecializationLabel.SetActive(false); classSpecializationButton.gameObject.SetActive(false); if (systemConfigurationManager.NewGameSpecialization == true) { foreach (ClassSpecialization classSpecialization in systemDataFactory.GetResourceList <ClassSpecialization>()) { if (classSpecialization.NewGameOption == true) { classSpecializationLabel.SetActive(true); classSpecializationButton.gameObject.SetActive(true); break; } } } /* * foreach (UINavigationController uINavigationController in uINavigationControllers) { * uINavigationController.UpdateNavigationList(); * } */ }
public void AcceptAchievements() { //Debug.Log("SystemQuestManager.AcceptAchievements()"); foreach (Quest resource in systemDataFactory.GetResourceList <Quest>()) { if (resource.IsAchievement == true && resource.TurnedIn == false && resource.IsComplete == false) { resource.AcceptQuest(); } } }
// finds a currency group that the currency belongs to, or returns null if it does not belong to a group public CurrencyGroup FindCurrencyGroup(Currency currency) { //Debug.Log("CurrencyConverter.FindCurrencyGroup(" + (currency == null ? "null" : currency.DisplayName) + ")"); if (currency != null) { foreach (CurrencyGroup currencyGroup in systemDataFactory.GetResourceList <CurrencyGroup>()) { if (currencyGroup.HasCurrency(currency)) { return(currencyGroup); } } } return(null); }
public void PopulateCredits() { bool firstCategoryPassed = false; // first, loope through and organize everything into categories // this is necessary because categories may not be unique across different content directories // and so need to have their content merged foreach (CreditsCategory creditsCategory in systemDataFactory.GetResourceList <CreditsCategory>()) { if (categoriesDictionary.ContainsKey(creditsCategory.CategoryName) == false) { categoriesDictionary.Add(creditsCategory.CategoryName, creditsCategory.CreditsNodes); } else { categoriesDictionary[creditsCategory.CategoryName].AddRange(creditsCategory.CreditsNodes); } } foreach (string categoryName in categoriesDictionary.Keys) { GameObject go = null; if (firstCategoryPassed) { // add a blank line as a spacer between categories go = objectPooler.GetPooledObject(creditCategoryTemplate, creditsContainer); go.GetComponent <CreditCategoryController>().MyTitleText.text = " "; } go = objectPooler.GetPooledObject(creditCategoryTemplate, creditsContainer); go.GetComponent <CreditCategoryController>().MyTitleText.text = categoryName; firstCategoryPassed = true; foreach (CreditsNode creditsNode in categoriesDictionary[categoryName]) { go = objectPooler.GetPooledObject(creditTemplate, creditsContainer); CreditController creditController = go.GetComponent <CreditController>(); creditController.CreditNameText.text = creditsNode.CreditName; creditController.AttributionText.text = creditsNode.CreditAttribution; creditController.UserUrl = creditsNode.UserUrl; creditController.DownloadUrl = creditsNode.DownloadUrl; uINavigationControllers[1].AddActiveButton(creditController.NameHighlightButton); uINavigationControllers[1].AddActiveButton(creditController.AttributionHighlightButton); creditController.NameHighlightButton.Configure(systemGameManager); creditController.AttributionHighlightButton.Configure(systemGameManager); } //(uINavigationControllers[1] as UINavigationGrid).NumRows = Mathf.CeilToInt((float)(uINavigationControllers[1].ActiveNavigableButtonCount) / 2f); } }
public override void Configure(SystemGameManager systemGameManager) { //Debug.Log("CombatLogUI.Awake()"); base.Configure(systemGameManager); chatHighlightButton.Configure(systemGameManager); combatHighlightButton.Configure(systemGameManager); systemHighlightButton.Configure(systemGameManager); PopulateObjectPool(); ClearLog(); textInput.onSubmit.AddListener(ProcessEnterKey); // populate the dictionary foreach (ChatCommand chatCommand in systemDataFactory.GetResourceList <ChatCommand>()) { commandDictionary.Add(chatCommand.DisplayName.ToLower().Replace(" ", ""), chatCommand); } }
protected override void PopulatePages() { //Debug.Log("AchievementPanelUI.CreatePages()"); QuestContentList page = new QuestContentList(); foreach (Quest quest in systemDataFactory.GetResourceList <Quest>()) { if (quest.IsAchievement && quest.TurnedIn) { page.quests.Add(quest); } if (page.quests.Count == pageSize) { pages.Add(page); page = new QuestContentList(); } } if (page.quests.Count > 0) { pages.Add(page); } AddResources(); }
public void ClearButtons() { // disable character button if option not allowed or no faction exists if (systemConfigurationManager.NewGameAppearance == true) { characterButton.gameObject.SetActive(true); } else { characterButton.gameObject.SetActive(false); } if (systemConfigurationManager.NewGameUMAAppearance == true) { appearanceButton.gameObject.SetActive(true); } else { appearanceButton.gameObject.SetActive(false); } // disable faction button if option not allowed or no faction exists factionButton.gameObject.SetActive(false); if (systemConfigurationManager.NewGameFaction == true) { foreach (Faction faction in systemDataFactory.GetResourceList <Faction>()) { if (faction.NewGameOption == true) { factionButton.gameObject.SetActive(true); break; } } } // disable class button if option not allowed or no faction exists classButton.gameObject.SetActive(false); if (systemConfigurationManager.NewGameClass == true) { foreach (CharacterClass characterClass in systemDataFactory.GetResourceList <CharacterClass>()) { if (characterClass.NewGameOption == true) { classButton.gameObject.SetActive(true); break; } } } // disable specialization button if option not allowed or class button disabled (specializations do not have a specific new game option) if (systemConfigurationManager.NewGameSpecialization == true) { if (classButton.gameObject.activeSelf == true) { specializationButton.gameObject.SetActive(true); } else { specializationButton.gameObject.SetActive(false); } } else { specializationButton.gameObject.SetActive(false); } uINavigationControllers[0].UpdateNavigationList(); }