清理smc

This commit is contained in:
panw
2025-03-18 16:00:04 +08:00
parent f7f9849d14
commit 3a7b0e4762
10 changed files with 20 additions and 347 deletions

View File

@@ -23,12 +23,7 @@ export class ShopHomeComp extends CCComp {
}
get_items(){
let goodsnode = this.node.getChildByName("goods").getChildByName("view").getChildByName("content")
goodsnode.getComponent(UITransform).height=Math.floor(smc.goods.length/4*240)+50
console.log("smc.goods",smc.goods)
for (let x = 0; x < smc.goods.length; x++) {
let goods=ecs.getEntity<Goods>(Goods)
goods.load(x,goodsnode)
}
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {