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

@@ -10,6 +10,7 @@ import { MonModelComp } from './MonModelComp';
import { HeroModelComp } from './HeroModelComp';
import { SkillEnt } from '../skill/SkillEnt';
import { Attrs } from '../common/config/HeroAttrs';
import { TalComp } from './TalComp';
const { ccclass, property } = _decorator;
@ccclass('SkillCon')
@@ -17,6 +18,7 @@ const { ccclass, property } = _decorator;
export class SkillConComp extends CCComp {
HeroView:any=null;
HeroEntity:any=null;
TALCOMP:any=null;
skill_cd=0
private _timers: { [key: string]: any } = {};
init(): void {
@@ -24,6 +26,7 @@ export class SkillConComp extends CCComp {
}
onLoad(){
this.HeroView=this.node.getComponent(HeroViewComp)
this.TALCOMP=this.node.getComponent(TalComp)
}
start() {
this.HeroEntity=this.HeroView.ent