This commit is contained in:
SoulliesOfficial
2026-04-01 12:23:27 -04:00
parent aff7ac0e03
commit c3b1561375
933 changed files with 114333 additions and 119360 deletions

View File

@@ -5,6 +5,7 @@ using Continentis.MainGame.Card;
using Continentis.MainGame.Combat;
using Lean.Pool;
using NaughtyAttributes;
using SLSFramework.General;
using SLSFramework.UModAssistance;
using UnityEngine;
using Object = UnityEngine.Object;
@@ -135,7 +136,23 @@ namespace Continentis.MainGame.Character
public virtual void Die()
{
CombatMainManager.Instance.characterController.RemoveCharacter(this);
// TODO: 1.1c — 死亡动画命令(入队 Cmd_PlayAnimation + VFX待动画系统完善后替换
Debug.Log($"[Combat] {data.displayName} 死亡");
CharacterBase self = this;
// 触发 onDeath 事件,供 Buff / 技能系统在角色移除前响应
CommandQueueManager.Instance.AddCommand(Cmd.Do(() =>
{
self.eventSubmodule.onDeath.Invoke();
CombatMainManager.Instance.eventCollection.onCharacterDeath.Invoke(self);
}));
// 角色移除:从战场数据结构中清理,并触发胜负检查
CommandQueueManager.Instance.AddCommand(Cmd.Do(() =>
{
CombatMainManager.Instance.characterController.RemoveCharacter(self);
}));
}
}
}