去掉goods

This commit is contained in:
2025-08-01 23:33:37 +08:00
parent 9d0fdfc0f8
commit 1eb936a003
4 changed files with 0 additions and 89 deletions

View File

@@ -1,41 +0,0 @@
import { _decorator, instantiate, Label, Prefab } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../common/SingletonModuleComp";
import { Item } from "./Item";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { HChipComp } from "../hero/HChipComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('GoodsComp')
@ecs.register('GoodsComp', false)
export class GoodsComp extends CCComp {
type:number=0;
g_uuid:number=0;
num:number=0;
inventory:number=0;
cost:number=0;
smc_index:number=0;
/** 视图层逻辑代码分离演示 */
start() {
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
// this.on(ModuleEvent.Cmd, this.onHandler, this);
}
update_data(){
}
buy(){
console.log("购买商品"+this.smc_index)
this.update_inventory()
}
update_inventory(){
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}