This commit is contained in:
2024-09-29 08:06:30 +08:00
parent 2a88532ef4
commit 331b22da07
31 changed files with 5067 additions and 7357 deletions

View File

@@ -10,7 +10,9 @@ export class Talent extends ecs.Entity {
/** ---------- 数据层 ---------- */
TalentView!: TalentComp
protected init() {
}
destroy(): void {
this.remove(TalentComp);
super.destroy();
@@ -19,11 +21,14 @@ export class Talent extends ecs.Entity {
/** 加载角色 */
load(pos: Vec3 = Vec3.ZERO,uuid:number=101,parent:Node) {
// var path = "game/monster/"+prefab_path;
var path = "game/heros/role";
var path = "game/talent";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent;
node.setScale(node.scale.x, node.scale.y, node.scale.z);
node.setPosition(pos)
console.log("load_talent",node)
let tv = node.getComponent(TalentComp)!;
tv.t_uuid = uuid;
this.add(tv);
}
}