| | |
| | | {
|
| | | [SerializeField] TreasureAnimation m_TreasureAnimation;
|
| | | [SerializeField] TreasurePotentialBriefInfo[] potentialBriefInfos = null;
|
| | | [SerializeField] RectTransform m_ContainerPotentialEffect;
|
| | |
|
| | | [SerializeField] ScrollRect m_PotentialEffectScroll;
|
| | | [SerializeField] RectTransform m_ContainerPotential;
|
| | | [SerializeField] RectTransform m_ContainerCurrentProperty;
|
| | | [SerializeField] PropertyBehaviour m_CurrentProperty;
|
| | | [SerializeField] Text m_CurrentPotential;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerNextProperty;
|
| | | [SerializeField] PropertyBehaviour m_NextProperty;
|
| | | [SerializeField] RectTransform m_ContainerNextPotential;
|
| | | [SerializeField] Text m_NextPotential;
|
| | | [SerializeField] Transform m_PotentialMaxLevelTip;
|
| | | [SerializeField] Transform m_ContainerPotentialMaxLevel;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerTargetPotential;
|
| | | [SerializeField] Text m_TargetPotentialTitle;
|
| | | [SerializeField] PropertyBehaviour m_TargetProperty;
|
| | | [SerializeField] Text m_TargetPotential;
|
| | |
|
| | | [SerializeField] Transform m_ContainerRequirement;
|
| | | [SerializeField] Text m_SPOwn;
|
| | | [SerializeField] Text m_SPNeed;
|
| | |
| | |
|
| | | [SerializeField] Text m_SkillTitle;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerPotential;
|
| | | [SerializeField] RectTransform m_ContainerGetSkill;
|
| | | [SerializeField] Text m_GetSkillCondition;
|
| | | [SerializeField] Image m_GetSkillIcon;
|
| | |
| | |
|
| | | var level = potential.level;
|
| | | var isMax = level >= config.SkillMaxLV;
|
| | | m_PotentialMaxLevelTip.gameObject.SetActive(isMax);
|
| | | m_ContainerPotentialMaxLevel.gameObject.SetActive(isMax);
|
| | | m_ContainerUpgrade.gameObject.SetActive(!isMax &&
|
| | | FuncOpen.Instance.IsFuncOpen(82) && model.IsPotentialUnlock(m_Treasure.id, selectedPotential));
|
| | | m_ContainerRequirement.gameObject.SetActive(!isMax);
|
| | |
| | | var funcOpenConfig = Config.Instance.Get<FuncOpenLVConfig>(82);
|
| | | m_PotentialLimit.text = Language.Get("TreasureSkillLimit", funcOpenConfig.LimitLV);
|
| | |
|
| | | m_PotentialEffectScroll.verticalNormalizedPosition = 1f;
|
| | |
|
| | | if (!model.IsPotentialUnlock(model.selectedTreasure, selectedPotential)
|
| | | || model.GetPotentialUnlockShow(model.selectedTreasure) || _state == 2)
|
| | | {
|
| | |
| | | m_TreasureAnimation.OnPotentialLineAnimComplete -= OnPotentialLineAnimComplete;
|
| | | m_TreasureAnimation.OnPotentialLineAnimComplete += OnPotentialLineAnimComplete;
|
| | |
|
| | | model.potentialBookSelectEvent -= DisplayPotentialBook;
|
| | | model.potentialBookSelectEvent += DisplayPotentialBook;
|
| | | model.potentialBookSelectEvent -= PotentialBookSelectEvent;
|
| | | model.potentialBookSelectEvent += PotentialBookSelectEvent;
|
| | |
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | |
| | |
|
| | | m_PotentialLine.Dispose();
|
| | |
|
| | | model.potentialBookSelectEvent -= DisplayPotentialBook;
|
| | | model.potentialBookSelectEvent -= PotentialBookSelectEvent;
|
| | | model.onPotentialLevelUpResultEvent -= OnPotentialLevelUp;
|
| | | model.potentialLevelUpdate -= PotentialLevelUpdate;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
|
| | |
| | | m_SelectedPotential = 0;
|
| | |
|
| | | model.inPotentialModifyPower = false;
|
| | | }
|
| | |
|
| | | private void PotentialBookSelectEvent(int _id)
|
| | | {
|
| | | m_PotentialEffectScroll.verticalNormalizedPosition = 1f;
|
| | | DisplayPotentialBook(_id);
|
| | | }
|
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | |
| | | if (level <= 0)
|
| | | {
|
| | | m_CurrentPotential.text = Language.Get("Hallows_NotLearn");
|
| | | m_CurrentProperty.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | var currentConfig = Config.Instance.Get<SkillConfig>(potential.id + level - 1);
|
| | | m_CurrentPotential.text = currentConfig.Description;
|
| | | m_CurrentProperty.gameObject.SetActive(true);
|
| | | m_CurrentProperty.DisplayUpper(6, currentConfig.MP);
|
| | | }
|
| | |
|
| | | var isMax = level >= config.SkillMaxLV;
|
| | | if (isMax)
|
| | | {
|
| | | m_NextPotential.text = "";
|
| | | }
|
| | | else
|
| | | m_ContainerNextPotential.gameObject.SetActive(!isMax);
|
| | | m_ContainerNextProperty.gameObject.SetActive(!isMax);
|
| | | if (!isMax)
|
| | | {
|
| | | var nextConfig = Config.Instance.Get<SkillConfig>(potential.id + level);
|
| | | m_NextPotential.text = nextConfig.Description;
|
| | | var currentConfig = Config.Instance.Get<SkillConfig>(potential.id + level - 1);
|
| | | var currentPropertyValue = 0;
|
| | | if (currentConfig != null)
|
| | | {
|
| | | currentPropertyValue = currentConfig.MP;
|
| | | }
|
| | | m_NextProperty.DisplayCompare(6, currentPropertyValue, nextConfig.MP);
|
| | | }
|
| | |
|
| | | var targetLevel = model.GetPotentialNextTargetLevel(potential.level);
|
| | | m_ContainerTargetPotential.gameObject.SetActive(targetLevel != 0);
|
| | | if (targetLevel != 0)
|
| | | {
|
| | | m_TargetPotentialTitle.text = Language.Get("TargetPotentialLevelEffect", targetLevel);
|
| | | var targetConfig = Config.Instance.Get<SkillConfig>(potential.id + targetLevel - 1);
|
| | | m_TargetPotential.text = targetConfig.Description;
|
| | | m_TargetProperty.Display(6, targetConfig.MP);
|
| | | }
|
| | |
|
| | | DisplayAddBookRedpoint();
|
| | |
| | |
|
| | | var level = potential.level;
|
| | | var isMax = level >= config.SkillMaxLV;
|
| | | m_PotentialMaxLevelTip.gameObject.SetActive(isMax);
|
| | | m_ContainerPotentialMaxLevel.gameObject.SetActive(isMax);
|
| | | m_ContainerUpgrade.gameObject.SetActive(!isMax && FuncOpen.Instance.IsFuncOpen(82));
|
| | | m_ContainerRequirement.gameObject.SetActive(!isMax);
|
| | |
|