| | |
| | | |
| | | 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) |
| | |
| | | { |
| | | 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(); |
| | | }); |
| | |
| | | // 释放者就是复活者时调用 |
| | | 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(); |
| | |
| | | // 复活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); |
| | |
| | | |
| | | 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; |