伤害技能添加,技能还需完善

This commit is contained in:
2024-08-26 23:42:38 +08:00
parent 8a44a15153
commit ede4ffd4ca
20 changed files with 1439 additions and 330 deletions

View File

@@ -29,12 +29,19 @@ export class Tooltip extends ecs.Entity {
this.remove(TooltipCom);
super.destroy();
}
load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",icon:string="") {
load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",s_uuid:number=1001,parent:any=null,cd:number=0.3) {
var path = "game/skills/tooltip";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent;
node.setPosition(pos)
var sv = node.getComponent(TooltipCom)!;
// console.log("load tooltip type",type,vaule,s_uuid);
sv.stype = type;
sv.value = vaule;
sv.s_uuid = s_uuid;
sv.alive_time = cd;
this.add(sv)
}
}