Esempio n. 1
0
        public void ShowAbilityRewards()
        {
            //Debug.Log("ClassChangePanelController.ShowAbilityRewards()");

            ClearRewardIcons();
            // show ability rewards
            if (characterClass != null && characterClass.GetFilteredCapabilities(NewGamePanel.MyInstance).AbilityList.Count > 0)
            {
                CapabilityProps capabilityProps = characterClass.GetFilteredCapabilities(NewGamePanel.MyInstance);
                abilityLabel.SetActive(true);
                abilityLabel.transform.SetAsFirstSibling();
                for (int i = 0; i < capabilityProps.AbilityList.Count; i++)
                {
                    if (capabilityProps.AbilityList[i] != null)
                    {
                        NewGameAbilityButton rewardIcon = Instantiate(rewardIconPrefab, abilityButtonArea.transform).GetComponent <NewGameAbilityButton>();
                        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);
            }
        }
Esempio n. 2
0
        public void ShowTraitRewards()
        {
            //Debug.Log("ClassChangePanelController.ShowTraitRewards()");

            ClearTraitRewardIcons();
            // show trait rewards
            if (characterClass != null && characterClass.GetFilteredCapabilities(NewGamePanel.MyInstance).TraitList.Count > 0)
            {
                CapabilityProps capabilityProps = characterClass.GetFilteredCapabilities(NewGamePanel.MyInstance);
                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 = Instantiate(rewardIconPrefab, abilityButtonArea.transform).GetComponent <NewGameAbilityButton>();
                        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);
            }
        }