feat(英雄系统): 添加天赋组件及配套功能

实现英雄天赋系统核心功能,包括:
1. 新增 TalComp 组件管理天赋的获取、触发和效果应用
2. 重构 TalSet 配置结构,完善天赋类型和效果枚举
3. 在 Hero/Monster 实体中集成天赋组件
4. 为 SkillConComp 和 HeroViewComp 添加天赋相关引用
This commit is contained in:
2025-10-28 00:07:50 +08:00
parent 175a6e4232
commit 3710f7f695
7 changed files with 255 additions and 41 deletions

View File

@@ -11,6 +11,7 @@ import { GameEvent } from "../common/config/GameEvent";
import { SkillSet } from "../common/config/SkillSet";
import { time } from "console";
import { getNeAttrs, getAttrs ,Attrs} from "../common/config/HeroAttrs";
import { TalComp } from "./TalComp";
/** 角色实体 */
@ecs.register(`Hero`)
@@ -22,14 +23,14 @@ export class Hero extends ecs.Entity {
this.addComponents<ecs.Comp>(
BattleMoveComp,
HeroModelComp,
TalComp
);
}
destroy(): void {
this.remove(HeroViewComp);
this.remove(HeroModelComp);
this.remove(TalComp);
super.destroy();
}