修复 buff 逻辑处理 bug : 预制体不能设置全局监听oops.message.on,会一直执行

This commit is contained in:
2024-08-28 00:09:55 +08:00
parent 5b1991c90f
commit 4096a17330
15 changed files with 195 additions and 143 deletions

View File

@@ -30,7 +30,7 @@ export class Skill extends ecs.Entity {
super.destroy();
}
load(pos: Vec3 = Vec3.ZERO,speed:number = 100,dis:number = 50,scale:number = 1,parent:Node,uuid:number=1001,atk:number =10,angle = 0,t_pos:Vec3 = null) {
var path = "game/skills/"+SkillSet[uuid].sp_name;
var path = "game/skills/"+smc.skills[uuid].sp_name;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
// console.log("load skill parent.position :",parent.position)
@@ -46,7 +46,7 @@ export class Skill extends ecs.Entity {
sv.atk = atk;
sv.angle = angle;
sv.t_pos = t_pos; // 目标增量
sv.type = SkillSet[uuid].type;
sv.type = smc.skills[uuid].type;
sv.box_tag= BoxSet.SKILL_TAG;
if(scale == 1){
sv.box_group=BoxSet.HERO