清理 ui1 ui2 精简到ui3 和ui4

This commit is contained in:
2025-10-12 14:58:52 +08:00
parent d628829718
commit 797cf72a09
101 changed files with 10216 additions and 107449 deletions

View File

@@ -24,28 +24,20 @@ export class topComp extends Component {
.start()
}
onDiamondUpdate(event:string,data:any){
this.update_diamond(smc.data.diamond)
tween(this.node.getChildByName("bar").getChildByName("diamond").getChildByName("num").getComponent(Label).node)
.to(0.1,{scale:v3(1.2,1.2,1)})
.to(0.1,{scale:v3(1,1,1)})
.start()
}
onMeatUpdate(event:string,data:any){
this.update_meat(smc.data.meat)
tween(this.node.getChildByName("bar").getChildByName("meat").getChildByName("num").getComponent(Label).node)
.to(0.1,{scale:v3(1.2,1.2,1)})
.to(0.1,{scale:v3(1,1,1)})
.start()
}
update_gold(gold:number){
this.node.getChildByName("bar").getChildByName("gold").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(gold);
}
update_diamond(diamond:number){
this.node.getChildByName("bar").getChildByName("diamond").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(diamond);
}
update_meat(meat:number){
this.node.getChildByName("bar").getChildByName("meat").getChildByName("num").getComponent(Label).string=NumberFormatter.formatNumber(meat);
}
update_all(){
this.update_gold(smc.data.gold)