修bug
This commit is contained in:
parent
d198bb4790
commit
e828d3c14c
11
Role/Fun.cs
11
Role/Fun.cs
@ -83,8 +83,15 @@ public class Fun : Base
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (targetAudience.Hp- finalDamage<0)
|
||||||
targetAudience.Hp -= finalDamage;
|
{
|
||||||
|
targetAudience.Hp = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
targetAudience.Hp -= finalDamage;
|
||||||
|
}
|
||||||
|
|
||||||
if (targetAudience.Hp<=0&&targetAudience.HaveDieTime==1)
|
if (targetAudience.Hp<=0&&targetAudience.HaveDieTime==1)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -92,10 +92,10 @@ public class Role : Fun
|
|||||||
// 使用 DOTween 动画平滑过渡血条填充
|
// 使用 DOTween 动画平滑过渡血条填充
|
||||||
DOTween.To(() => HpfiilYello.fillAmount, x => HpfiilYello.fillAmount = x, hp / maxHp, 0.8f) // 0.5f 为过渡时间
|
DOTween.To(() => HpfiilYello.fillAmount, x => HpfiilYello.fillAmount = x, hp / maxHp, 0.8f) // 0.5f 为过渡时间
|
||||||
.SetEase(Ease.InOutQuad); // 使用缓动效果,使血条变化更加平滑
|
.SetEase(Ease.InOutQuad); // 使用缓动效果,使血条变化更加平滑
|
||||||
//if (UIContorl.instance.NowShowInfo!=null&&UIContorl.instance.NowShowInfo.Id == 1)
|
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);
|
UIContorl.instance.NowShowInfo.UpDateShow("1", "Enemy_001", "0", "3", "1", "测试文档一", hp, maxHp);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新血量文本效果
|
// 更新血量文本效果
|
||||||
@ -325,6 +325,7 @@ public class Role : Fun
|
|||||||
|
|
||||||
if (Application.isPlaying)
|
if (Application.isPlaying)
|
||||||
{
|
{
|
||||||
|
GetComponent<CharacterClick>().HideInfoPanel();
|
||||||
animationHighlight = dieIndex;
|
animationHighlight = dieIndex;
|
||||||
Navigation.PauseAnimation();
|
Navigation.PauseAnimation();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user