feat(英雄系统): 添加天赋组件及配套功能
实现英雄天赋系统核心功能,包括: 1. 新增 TalComp 组件管理天赋的获取、触发和效果应用 2. 重构 TalSet 配置结构,完善天赋类型和效果枚举 3. 在 Hero/Monster 实体中集成天赋组件 4. 为 SkillConComp 和 HeroViewComp 添加天赋相关引用
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user