战斗暴击 闪避 基本完成

This commit is contained in:
walkpan
2024-11-17 19:08:21 +08:00
parent 75d2dd5988
commit 49e5447234
10 changed files with 552 additions and 93 deletions

View File

@@ -35,13 +35,16 @@ export class Tooltip extends ecs.Entity {
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent;
if(parent.scale.x < 0){
node.setScale(-node.scale.x, node.scale.y, 0);
}
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 = 0.3;
sv.alive_time = 0.5;
this.add(sv)
}
}