refactor(skill): 重构技能组件目录结构并重命名施法请求组件
将技能相关组件从hero目录移动到skill目录 将CastSkillRequestComp重命名为CSRequestComp 更新相关引用和文档说明
This commit is contained in:
47
assets/script/game/skill/SMoveComp.ts
Normal file
47
assets/script/game/skill/SMoveComp.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import { Vec3, v3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { BezierMove } from "../BezierMove/BezierMove";
|
||||
import { RType, SkillSet } from "../common/config/SkillSet";
|
||||
/**
|
||||
* 技能移动数据组件
|
||||
* 存储技能实体的移动相关数据
|
||||
*/
|
||||
@ecs.register('SMoveData')
|
||||
export class SMoveDataComp extends ecs.Comp {
|
||||
/** 起始位置 */
|
||||
startPos: Vec3 = v3();
|
||||
/** 目标位置 */
|
||||
targetPos: Vec3 = v3();
|
||||
/** 移动速度 */
|
||||
speed: number = 500;
|
||||
/** 移动持续时间 */
|
||||
duration: number = 0;
|
||||
/** 移动方向 */
|
||||
direction: Vec3 = v3();
|
||||
/** 是否自动销毁(到达目标后) */
|
||||
autoDestroy: boolean = true;
|
||||
s_uuid:number=0;
|
||||
reset() {
|
||||
this.startPos.set(0, 0, 0);
|
||||
this.targetPos.set(0, 0, 0);
|
||||
this.speed = 500;
|
||||
this.duration = 0;
|
||||
this.direction.set(0, 0, 0);
|
||||
this.autoDestroy = true;
|
||||
}
|
||||
}
|
||||
|
||||
// /** 业务层业务逻辑处理对象 */
|
||||
// export class SMoveSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem {
|
||||
// filter(): ecs.IMatcher {
|
||||
// return ecs.allOf(SMoveDataComp);
|
||||
// }
|
||||
// entityEnter(e: ecs.Entity): void {
|
||||
// // 注:自定义业务逻辑
|
||||
// let s_uuid=e.get(SMoveDataComp).s_uuid
|
||||
// let SConf=SkillSet[s_uuid]
|
||||
|
||||
// e.remove(SMoveDataComp);
|
||||
// }
|
||||
|
||||
// }
|
||||
Reference in New Issue
Block a user