This commit is contained in:
2024-08-26 17:33:14 +08:00
parent 7b618eb645
commit 8a44a15153
18 changed files with 1413 additions and 808 deletions

View File

@@ -33,7 +33,9 @@ export class Skill extends ecs.Entity {
var path = "game/skills/"+SkillSet[uuid].sp_name;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent;
// console.log("load skill parent.position :",parent.position)
pos=v3(parent.position.x+pos.x,parent.position.y+pos.y)
node.parent = parent.parent;
// node.setScale(scale,1)
//转换pos为世界坐标
node.setPosition(pos)
@@ -43,7 +45,7 @@ export class Skill extends ecs.Entity {
sv.scale = scale;
sv.atk = atk;
sv.angle = angle;
sv.t_pos = t_pos;
sv.t_pos = t_pos; // 目标增量
sv.type = SkillSet[uuid].type;
sv.box_tag= BoxSet.SKILL_TAG;
if(scale == 1){
@@ -54,12 +56,3 @@ export class Skill extends ecs.Entity {
this.add(sv);
}
}
/** Skill 模块业务逻辑系统组件,如无业务逻辑处理可删除此对象 */
export class EcsSkillSystem extends ecs.System {
constructor() {
super();
// this.add(new ecs.ComblockSystem());
}
}