public void ShowAbilityRewards() { //Debug.Log("ClassChangePanelController.ShowAbilityRewards()"); ClearRewardIcons(); // show ability rewards if (newGameManager.CharacterClass != null && newGameManager.CharacterClass.GetFilteredCapabilities(newGameManager).AbilityList.Count > 0) { CapabilityProps capabilityProps = newGameManager.CharacterClass.GetFilteredCapabilities(newGameManager); abilityLabel.SetActive(true); abilityLabel.transform.SetAsFirstSibling(); for (int i = 0; i < capabilityProps.AbilityList.Count; i++) { if (capabilityProps.AbilityList[i] != null) { NewGameAbilityButton rewardIcon = objectPooler.GetPooledObject(rewardIconPrefab, abilityButtonArea.transform).GetComponent <NewGameAbilityButton>(); rewardIcon.Configure(systemGameManager); rewardIcon.AddAbility(capabilityProps.AbilityList[i]); abilityRewardIcons.Add(rewardIcon); /* * if (characterClass.AbilityList[i].MyRequiredLevel > 1) { * rewardIcon.StackSizeText.text = "Level\n" + characterClass.AbilityList[i].MyRequiredLevel; * rewardIcon.MyHighlightIcon.color = new Color32(255, 255, 255, 80); * } */ } } } else { abilityLabel.SetActive(false); } }
public void ShowTraitRewards() { //Debug.Log("ClassChangePanelController.ShowTraitRewards()"); ClearTraitRewardIcons(); // show trait rewards if (newGameManager.Faction != null && newGameManager.Faction.GetFilteredCapabilities(newGameManager).TraitList.Count > 0) { CapabilityProps capabilityProps = newGameManager.Faction.GetFilteredCapabilities(newGameManager); traitLabel.SetActive(true); // move to bottom of list before putting traits below it traitLabel.transform.SetAsLastSibling(); for (int i = 0; i < capabilityProps.TraitList.Count; i++) { if (capabilityProps.TraitList[i] != null) { NewGameAbilityButton rewardIcon = objectPooler.GetPooledObject(rewardIconPrefab, abilityButtonArea.transform).GetComponent <NewGameAbilityButton>(); rewardIcon.Configure(systemGameManager); rewardIcon.AddAbility(capabilityProps.TraitList[i]); traitRewardIcons.Add(rewardIcon); /* * if ((characterClass.TraitList[i] as StatusEffect).MyRequiredLevel > 1) { * rewardIcon.StackSizeText.text = "Level\n" + (characterClass.TraitList[i] as StatusEffect).MyRequiredLevel; * rewardIcon.MyHighlightIcon.color = new Color32(255, 255, 255, 80); * } */ } } } else { traitLabel.SetActive(false); } }