cb/assets/Script/heathnum.ts
computer\尼卡 cc21609064 提交 商城
2025-07-02 15:32:19 +08:00

35 lines
657 B
TypeScript

import NumberToImage from "./NumberToImage";
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
//商店界面
@property(cc.Node)
heath: cc.Node = null;
// onLoad () {}
//金币数量
@property(cc.Node)
coin: cc.Node = null;
start() {
this.openShop();
}
//打开商店界面
openShop() {
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.hp, 30, 15, "coin_", this.coin, true);
}
//关闭商店界面
closeShop() {
//销毁预制体
this.heath.destroy();
}
// update (dt) {}
}