From ca85c0a70922aa219f6cad5e8af8ad004c3cb4b3 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 05 十一月 2025 14:36:02 +0800
Subject: [PATCH] 125 战斗 天子血条刷新包
---
Main/System/Battle/UIComp/BattleHeroInfoBar.cs | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Main/System/Battle/UIComp/BattleHeroInfoBar.cs b/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
index 859cb6b..afa14e0 100644
--- a/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
+++ b/Main/System/Battle/UIComp/BattleHeroInfoBar.cs
@@ -150,11 +150,14 @@
{
KillTween(ref hpTween);
+ float fromValue = (float)fromHp / (float)maxHp;
float targetValue = (float)toHp / (float)maxHp;
if (tween)
{
- hpTween = sliderHp.DOValue(targetValue, 0.3f);
+ // 鍏抽敭淇:鍏堣缃捣濮嬪��,鍐嶆挱鏀惧姩鐢诲埌鐩爣鍊�
+ sliderHp.value = fromValue; // 鈫� 杩欒鏄叧閿�!
+ hpTween = sliderHp.DOValue(targetValue, 0.3f).SetAutoKill(false);
battleObject.battleField.battleTweenMgr.OnPlayTween(hpTween);
}
else
@@ -170,11 +173,14 @@
{
KillTween(ref xpTween);
+ float fromValue = (float)fromXp / (float)maxXp;
float targetValue = (float)toXp / (float)maxXp;
if (tween)
{
- xpTween = sliderXp.DOValue(targetValue, 0.2f);
+ // 鍚屾牱鐨勪慨澶�
+ sliderXp.value = fromValue; // 鈫� 杩欒鏄叧閿�!
+ xpTween = sliderXp.DOValue(targetValue, 0.2f).SetAutoKill(false);
battleObject.battleField.battleTweenMgr.OnPlayTween(xpTween);
}
else
--
Gitblit v1.8.0