yyl
2026-01-12 f584e997a5bdcb51e786cca1faa9179c77257708
125 战斗 飘字不消失的问题
3个文件已修改
29 ■■■■ 已修改文件
Main/System/Battle/BattleObject/BattleObject.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleTweenMgr.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/UIComp/BattleHeroInfoBar.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleObject/BattleObject.cs
@@ -585,9 +585,9 @@
        heroGo.SetActive(true);
        motionBase.HaveRest();
        heroRectTrans.anchoredPosition = Vector2.zero;
        heroInfoBar.HaveRest();
        isReborning = false;
        heroInfoBar.SetActive(false);
        SetFront();
    }
Main/System/Battle/BattleTweenMgr.cs
@@ -58,7 +58,7 @@
    public void OnKillTween(Tween tween)
    {
        tween.Kill();
        tween?.Kill();
        if (tween != null && tweenList.Contains(tween))
        {
            tweenList.Remove(tween);
@@ -69,6 +69,11 @@
    {
        foreach (var tween in tweenList)
        {
            tween.Complete(true);
        }
        foreach (var tween in tweenList)
        {
            if (tween != null && !tween.IsComplete())
            {
                tween.Kill();
Main/System/Battle/UIComp/BattleHeroInfoBar.cs
@@ -29,7 +29,7 @@
    
    [Header("UI Components")]
    public Slider sliderHp;
    // public Slider sliderSlowHp;
    public Slider sliderSlowHp;
    public Slider sliderXp;
    public GameObject maxXpGO;
    public Slider sliderShield1;
@@ -81,6 +81,7 @@
    {
        battleObject = _battleObject;
        heroInfoContainer.SetHeroInfo(battleObject.teamHero);
        CleanupTips();
        RefreshBuff(battleObject.buffMgr.GetBuffIconList());
        if (!battleObject.IsTianziBoss())
@@ -211,7 +212,7 @@
            hpTween = DOTween.Sequence();
            sliderHp.value = fromValue;
            hpTween.Append(sliderHp.DOValue(targetValue, 0.3f).SetAutoKill(false));
            // hpTween.Join(sliderSlowHp.DOValue(targetValue, 0.8f).SetAutoKill(false));
            hpTween.Join(sliderSlowHp.DOValue(targetValue, 0.8f).SetAutoKill(false));
            // sliderSlowHp
            battleObject.battleField.battleTweenMgr.OnPlayTween(hpTween);
        }
@@ -396,12 +397,12 @@
        float toHpValue = (float)toHp / (float)maxHp;
        
        sliderHp.value = fromHpValue;
        // sliderSlowHp.value = fromHpValue;
        sliderSlowHp.value = fromHpValue;
        if (Mathf.Abs(fromHpValue - toHpValue) > 0.001f)
        {
            damageSequence.Append(sliderHp.DOValue(toHpValue, 0.2f));
            // damageSequence.Join(sliderSlowHp.DOValue(toHpValue, 0.6f));
            damageSequence.Join(sliderSlowHp.DOValue(toHpValue, 0.6f));
        }
        damageSequence.Play();
@@ -762,4 +763,15 @@
    {
        // TODO: 显示buff描述/当前身上所有buff
    }
    public void HaveRest()
    {
        CleanupTips();
        SetActive(false);
        //  关掉所有的tween
        KillTween(ref hpTween);
        KillTween(ref xpTween);
        KillTween(ref damageSequence);
    }
}