refactor(hero): 将触发技能配置从 HeroInfo 移至 HeroAttrsComp

重构英雄和怪物实体的创建逻辑,将 call、dead、fstart、fend、atking、atked 等触发技能配置从静态 HeroInfo 表复制到 HeroAttrsComp 组件实例中。
修改 SCastSystem、HeroAtkSystem、MissionComp 和 HeroViewComp 中的技能触发逻辑,改为直接读取组件内的配置。
这消除了对全局静态配置的依赖,使技能触发逻辑与实体数据更紧密地绑定,提高了代码的内聚性和可维护性。
This commit is contained in:
walkpan
2026-04-15 22:27:38 +08:00
parent ba3e416ab0
commit e3c6aad172
7 changed files with 53 additions and 28 deletions

View File

@@ -428,9 +428,8 @@ export class HeroViewComp extends CCComp {
this.realDeadTime = this.monDeadTime;
}
// 如果角色带有死亡触发技能,则由 SCastSystem 播放 playReady("dead"),不播放原有的 deaded 特效
const heroInfo = HeroInfo[this.model.hero_uuid];
if (heroInfo && heroInfo.dead) {
// 如果角色带有死亡触发技能,则由 SCastSystem 播放 playReady("dead")
if (this.model && this.model.dead && this.model.dead.length > 0) {
// SCastSystem will handle the "dead" ready animation
} else {
// 播放默认死亡特效