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

@@ -13,6 +13,7 @@ import { FightSet, TooltipTypes } from "../common/config/Mission";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { AttrSet, HeroInfo, HeroUpSet } from "../common/config/heroSet";
import { Attrs, AttrsType, BType, NeAttrs } from "../common/config/HeroAttrs";
import { TalComp } from "./TalComp";
const { ccclass, property } = _decorator;
/**
@@ -73,6 +74,7 @@ export interface BuffInfo {
@ecs.register('HeroView', false) // 定义ECS 组件
export class HeroViewComp extends CCComp {
BUFFCOMP:BuffComp=null!
TALCOMP:any=null!
as: HeroSpine = null!
status:String = "idle"
hero_uuid:number = 1001;
@@ -143,6 +145,7 @@ export class HeroViewComp extends CCComp {
start () {
this.as.idle()
this.BUFFCOMP=this.node.getComponent(BuffComp);
this.TALCOMP=this.node.getComponent(TalComp);
// console.log("[HeroViewComp]:heroview"+this.hero_name,this.Attrs)
/** 方向 */
this.node.setScale(this.scale,1);