refactor(skill): 技能初步完成,下一步完善伤害系统

重命名SMoveData组件并修复组件添加方式
将SMoveData组件重命名为SMoveDataComp以保持命名一致性
修复Skill类中组件添加方式,明确指定组件类型参数
This commit is contained in:
2025-10-31 11:06:17 +08:00
parent 3b21ee4048
commit 8c597ae008
2 changed files with 3 additions and 3 deletions

View File

@@ -30,8 +30,8 @@ export class Skill extends ecs.Entity {
/** 实始添加的数据层组件 */
protected init() {
this.addComponents<SDataCom>();
this.addComponents<SMoveDataComp>();
this.addComponents<SDataCom>(SDataCom);
this.addComponents<SMoveDataComp>(SMoveDataComp);
}
load(startPos: Vec3, parent: Node, s_uuid: number, targetPos: Vec3,
caster:HeroViewComp) {