dd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user