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