重做 局内经验的利用,加攻 加血,特殊技能,todo:先完成物品设定

This commit is contained in:
2024-11-25 00:02:07 +08:00
parent 5a268cc8f2
commit 2d4d564c1f
31 changed files with 5212 additions and 6212 deletions

View File

@@ -0,0 +1,30 @@
import { instantiate, Prefab } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { ItemComp } from "./ItemComp";
/** Item 模块 */
@ecs.register(`Item`)
export class Item extends ecs.Entity {
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=1001,num:number=0,praent:any=null) {
var path = "game/gui/item";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = praent
let iv = node.getComponent(ItemComp)!;
iv.i_uuid = uuid
iv.num=num
this.add(iv)
}
/** 模块资源释放 */
destroy() {
super.destroy();
}
}
/** Item 模块业务逻辑系统组件,如无业务逻辑处理可删除此对象 */