更新
This commit is contained in:
@@ -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);
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user