From b97ca7fc69d2cddeaf1af2d4e59ba4b413034784 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 12 三月 2026 16:51:46 +0800
Subject: [PATCH] 59 邮件系统-客户端 邮件标题支持参数匹配
---
Main/System/HeroUI/HeroTrainAddAttrCell.cs | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/Main/System/HeroUI/HeroTrainAddAttrCell.cs b/Main/System/HeroUI/HeroTrainAddAttrCell.cs
index 142df5f..050c732 100644
--- a/Main/System/HeroUI/HeroTrainAddAttrCell.cs
+++ b/Main/System/HeroUI/HeroTrainAddAttrCell.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
@@ -11,20 +12,32 @@
public class HeroTrainAddAttrCell : MonoBehaviour
{
[SerializeField] Text[] addPerText; //澧炲姞鐧惧垎姣旓紙椋樺姩锛� 鍔犲叆姹�
- [SerializeField] PositionTween addPerObject;
+ [SerializeField] Transform addPerObject;
- public void Display(int value, Action func)
+ public void Display(HeroInfo hero, Action func)
{
+ int value = hero.qualityConfig.LVAddPer;
addPerObject.SetActive(true);
+ var lvConfig = HeroQualityLVConfig.GetQualityLVConfig(hero.Quality, hero.heroLevel + 1);
+ var beforeLVConfig = HeroQualityLVConfig.GetQualityLVConfig(hero.Quality, hero.heroLevel);
for (int i = 0; i < addPerText.Length; i++)
{
- addPerText[i].text = "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], value);
+ var addValue = lvConfig.AttrValueList[i] - beforeLVConfig.AttrValueList[i];
+ string addString = "";
+ if (addValue != 0)
+ {
+ addString = $"+{addValue}\n";
+ }
+ addPerText[i].text = addString + "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], value);
}
- addPerObject.Play(() =>
+ addPerObject.localPosition = new Vector3(0, 0, 0);
+ addPerObject.DOLocalMove(new Vector3(0, 40, 0), 0.5f).OnComplete(()=>
{
func?.Invoke();
- });
+ }
+ );
+
}
}
\ No newline at end of file
--
Gitblit v1.8.0