伤害技能添加,技能还需完善
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user