| | |
| | | [SerializeField] Text[] inheritAttrText; //武将会继承的属性 |
| | | [SerializeField] RichText heroAddPerText; //主公(上阵)加成描述 |
| | | [SerializeField] Text[] heroAddAttrPerText; //主公(上阵)加成 |
| | | [SerializeField] Text[] addPerText; //增加百分比(飘动) |
| | | [SerializeField] PositionTween addPerObject; |
| | | [SerializeField] Transform addPerParent; |
| | | [SerializeField] HeroTrainAddAttrCell addPerObject; |
| | | [SerializeField] Image lvupMoneyIcon; |
| | | [SerializeField] Text lvupMoneyText; |
| | | [SerializeField] Text lvupBtnText; |
| | |
| | | [SerializeField] Image redpointAwake; |
| | | [SerializeField] Image redpointGift; |
| | | [SerializeField] Image redpointLVUP; |
| | | |
| | | |
| | | Queue<HeroTrainAddAttrCell> lvupAttrQueue = new Queue<HeroTrainAddAttrCell>(); |
| | | |
| | | string guid; |
| | | HeroInfo hero; |
| | |
| | | jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(hero.heroConfig.Class)); |
| | | jobPosNameText.text = HeroUIManager.Instance.GetJobName(hero.heroConfig.Class); |
| | | descText.text = hero.heroConfig.Desc; |
| | | fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculatePower()); |
| | | fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculateFightPower()); |
| | | PlayerMainDate.Instance.AddPowerNotOnTeam(hero); |
| | | lockImg.SetActive(hero.isLock); |
| | | unLockImg.SetActive(!hero.isLock); |
| | |
| | | { |
| | | lvupBtnText.text = Language.Get("L1110"); |
| | | lvupBtn.SetInteractable(false); |
| | | lvupMoneyIcon.SetActive(false); |
| | | lvupMoneyText.SetActive(false); |
| | | |
| | | } |
| | | } |
| | |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | //预显示 |
| | | lvupEffect.Play(); |
| | | addPerObject.SetActive(true); |
| | | for (int i = 0; i < addPerText.Length; i++) |
| | | { |
| | | addPerText[i].text = "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], hero.qualityConfig.LVAddPer); |
| | | } |
| | | addPerObject.Play(() => |
| | | { |
| | | addPerObject.SetActive(false); |
| | | var cell = RequestCell(); |
| | | cell.transform.localPosition = new Vector3(0, 0, 0); |
| | | cell.Display(hero.qualityConfig.LVAddPer, ()=> |
| | | { |
| | | cell.SetActive(false); |
| | | ReturnCell(cell); |
| | | }); |
| | | HeroUIManager.Instance.lastFightPower = new KeyValuePair<string, long>(hero.itemHero.guid, hero.CalculatePower(false)); |
| | | |
| | | HeroUIManager.Instance.lastFightPower = new KeyValuePair<string, long>(hero.itemHero.guid, hero.CalculateFightPower(false)); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | HeroTrainAddAttrCell RequestCell() |
| | | { |
| | | |
| | | if (lvupAttrQueue.Count == 0) |
| | | { |
| | | return Instantiate(addPerObject, addPerParent); |
| | | } |
| | | return lvupAttrQueue.Dequeue(); |
| | | } |
| | | |
| | | |
| | | void ReturnCell(HeroTrainAddAttrCell cell) |
| | | { |
| | | lvupAttrQueue.Enqueue(cell); |
| | | } |
| | | |
| | | |
| | | void RefreshAllPotential() |
| | | { |
| | |
| | | if (nextQualityBreakConfig.AttrIDList[j] == 0) |
| | | continue; |
| | | string format = i < hero.breakLevel ? "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}") : "{0}+{1}"; |
| | | attrStrArr.Add((string.IsNullOrEmpty(nextQualityBreakConfig.SkillIName) ? string.Empty : Language.Get("equipQualityFormat", nextQualityBreakConfig.SkillIName)) + |
| | | attrStrArr.Add((string.IsNullOrEmpty(nextQualityBreakConfig.SkillIName) ? string.Empty : Language.Get("L1039", nextQualityBreakConfig.SkillIName)) + |
| | | PlayerPropertyConfig.GetFullDescription(nextQualityBreakConfig.AttrIDList[j], nextQualityBreakConfig.AttrValueList[j], format)); |
| | | } |
| | | |
| | |
| | | var skill = SkillConfig.Get(nextQualityBreakConfig.SkillID); |
| | | if (skill != null) |
| | | { |
| | | attrStrArr.Add(Language.Get("equipQualityFormat", skill.SkillName) + skill.Description); |
| | | attrStrArr.Add(Language.Get("L1039", skill.SkillName) + skill.Description); |
| | | } |
| | | else |
| | | { |
| | |
| | | else if (type == 2) |
| | | { |
| | | var skill = SkillConfig.Get(config.SkillID); |
| | | awakeStr = Language.Get("equipQualityFormat", skill.SkillName) + skill.Description; |
| | | awakeStr = Language.Get("L1039", skill.SkillName) + skill.Description; |
| | | } |
| | | else |
| | | { |
| | | for (int k = 0; k < config.AttrIDList.Length; k++) |
| | | { |
| | | awakeStr += (string.IsNullOrEmpty(config.SkillIName) ? string.Empty : Language.Get("equipQualityFormat", config.SkillIName)) + |
| | | awakeStr += (string.IsNullOrEmpty(config.SkillIName) ? string.Empty : Language.Get("L1039", config.SkillIName)) + |
| | | PlayerPropertyConfig.GetFullDescription(config.AttrIDList[k], config.AttrValueList[k], "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}")) |
| | | + (k == config.AttrIDList.Length - 1 ? "" : "\n"); |
| | | } |
| | |
| | | { |
| | | if (teamType != TeamType.Story) |
| | | return; |
| | | fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculatePower()); |
| | | fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculateFightPower()); |
| | | } |
| | | |
| | | void RefreshFreeze() |
| | |
| | | redpointLVUP.SetActive(true); |
| | | return; |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | |