开始商店 脚本和ui

This commit is contained in:
2025-08-20 17:46:06 +08:00
parent b531948d4d
commit 1896b5fab0
22 changed files with 9189 additions and 11412 deletions

View File

@@ -0,0 +1,26 @@
import { _decorator, Component, Node } from 'cc';
import { GoodsComp } from './GoodsComp';
const { ccclass, property } = _decorator;
@ccclass('ShopPageComp')
export class ShopPageComp extends Component {
daily_goods:any[]=[1001,1002,1004,1006]
weekly_goods:any[]=[]
monthly_goods:any[]=[]
special_goods:any[]=[]
start() {
this.update_daily_goods()
}
update_daily_goods(){
let items=this.node.getChildByName("daily").getChildByName("items").children
for(let i=0;i<items.length;i++){
let goods=items[i]
goods.getComponent(GoodsComp).update_data(this.daily_goods[i])
}
}
update(deltaTime: number) {
}
}