This commit is contained in:
GL 2025-01-02 18:04:35 +08:00
parent d198bb4790
commit e828d3c14c
2 changed files with 14 additions and 6 deletions

View File

@ -83,8 +83,15 @@ public class Fun : Base
if (targetAudience.Hp- finalDamage<0)
{
targetAudience.Hp = 0;
}
else
{
targetAudience.Hp -= finalDamage;
}
if (targetAudience.Hp<=0&&targetAudience.HaveDieTime==1)
{

View File

@ -92,10 +92,10 @@ public class Role : Fun
// 使用 DOTween 动画平滑过渡血条填充
DOTween.To(() => HpfiilYello.fillAmount, x => HpfiilYello.fillAmount = x, hp / maxHp, 0.8f) // 0.5f 为过渡时间
.SetEase(Ease.InOutQuad); // 使用缓动效果,使血条变化更加平滑
//if (UIContorl.instance.NowShowInfo!=null&&UIContorl.instance.NowShowInfo.Id == 1)
//{
// UIContorl.instance.NowShowInfo.UpDateShow("1", "Enemy_001", "0", "3", "1", "测试文档一", hp, maxHp);
//}
if (UIContorl.instance.NowShowInfo != null && UIContorl.instance.NowShowInfo.Id == 1 && this == UIContorl.instance.NowShowInfo.role)
{
UIContorl.instance.NowShowInfo.UpDateShow("1", "Enemy_001", "0", "3", "1", "测试文档一", hp, maxHp);
}
}
// 更新血量文本效果
@ -325,6 +325,7 @@ public class Role : Fun
if (Application.isPlaying)
{
GetComponent<CharacterClick>().HideInfoPanel();
animationHighlight = dieIndex;
Navigation.PauseAnimation();