技能还有错误

This commit is contained in:
2024-08-21 17:55:15 +08:00
parent 76a7854e94
commit ee7f1c322b
7 changed files with 78 additions and 55 deletions

View File

@@ -28,7 +28,7 @@ export class Skill extends ecs.Entity {
this.remove(SkillCom);
super.destroy();
}
load(pos: Vec3 = Vec3.ZERO,speed:number = 100,dis:number = 50,scale:number = 1,parent:Node,skill_name:string = "base",atk:number =10,t_pos:Vec3 = null) {
load(pos: Vec3 = Vec3.ZERO,speed:number = 100,dis:number = 50,scale:number = 1,parent:Node,skill_name:string = "base",atk:number =10,angle = 0,t_pos:Vec3 = null) {
var path = "game/skills/"+skill_name;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
@@ -42,6 +42,7 @@ export class Skill extends ecs.Entity {
sv.dis = dis;
sv.scale = scale;
sv.atk = atk;
sv.angle = angle;
sv.t_pos = t_pos;
if(scale == 1){
sv.change_collider_group(BoxSet.HERO_SKILL)