yyl
2026-05-26 ed4312ff529fd56bad20ef15eeeb1a7e45051ae3
Main/System/Battle/BattleObject/HeroBattleObject.cs
@@ -476,6 +476,12 @@
    public override void OnDeath(Action _onDeathAnimationComplete, bool withoutAnime = false)
    {
#if UNITY_EDITOR
        if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
        {
            // BattleDebug.LogError($"[HeroBattleObject死亡诊断] OnDeath objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} withoutAnime={withoutAnime} motionHash={motionBase?.GetHashCode() ?? 0}");
        }
#endif
        buffMgr.RemoveAllBuff();
        battleField.soundManager.PlayEffectSound(teamHero.heroConfig.DeathSFX, false);
        if (withoutAnime)
@@ -487,6 +493,12 @@
        {
            motionBase.PlayDeadAnimation(() =>
            {
#if UNITY_EDITOR
                if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
                {
                    // BattleDebug.LogError($"[HeroBattleObject死亡诊断] 死亡动画回调 objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} motionHash={motionBase?.GetHashCode() ?? 0}");
                }
#endif
                SetDeath();
                _onDeathAnimationComplete?.Invoke();
            });
@@ -511,6 +523,12 @@
    //  释放者就是复活者时调用
    public override void PreReborn(bool reviveSelf = false)
    {
#if UNITY_EDITOR
        if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
        {
            // BattleDebug.LogError($"[HeroBattleObject死亡诊断] PreReborn objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} reviveSelf={reviveSelf} motionHash={motionBase?.GetHashCode() ?? 0}");
        }
#endif
        heroGo.SetActive(true);
        motionBase.skeletonAnim.skeleton.A = 0f;
        motionBase.skeletonAnim.LateUpdate();
@@ -521,6 +539,12 @@
    //  复活action
    public override void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData, bool reviveSelf = false, RecordAction parentAction = null)
    {
#if UNITY_EDITOR
        if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
        {
            // BattleDebug.LogError($"[HeroBattleObject死亡诊断] OnReborn objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} reviveSelf={reviveSelf} motionHash={motionBase?.GetHashCode() ?? 0}");
        }
#endif
        isReborning = true;
        heroGo.SetActive(true);
        motionBase.ResetForReborn(reviveSelf);
@@ -531,6 +555,12 @@
    public override void AfterReborn()
    {
#if UNITY_EDITOR
        if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
        {
            // BattleDebug.LogError($"[HeroBattleObject死亡诊断] AfterReborn objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} motionHash={motionBase?.GetHashCode() ?? 0}");
        }
#endif
        //  清空所有
        motionBase.ResetForReborn(false);
        isReborning = false;