This commit is contained in:
pan@work
2024-09-27 16:07:56 +08:00
parent 027f527865
commit 2a88532ef4
12 changed files with 3422 additions and 2870 deletions

View File

@@ -0,0 +1,29 @@
import { instantiate, Prefab, Vec3 ,Node} from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { TalentComp } from "./TalentComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp";
/** Talent 模块 */
@ecs.register(`Talent`)
export class Talent extends ecs.Entity {
/** ---------- 数据层 ---------- */
TalentView!: TalentComp
destroy(): void {
this.remove(TalentComp);
super.destroy();
}
/** 加载角色 */
load(pos: Vec3 = Vec3.ZERO,uuid:number=101,parent:Node) {
// var path = "game/monster/"+prefab_path;
var path = "game/heros/role";
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)
}
}