/** * 升级节点记录 */ const {ccclass, property} = cc._decorator; @ccclass export default class CardUplevelItem extends cc.Component { @property(cc.Label) mLabel: cc.Label = null;//数值显示 @property(cc.ProgressBar) mProgessBar: cc.ProgressBar = null; public setLabel(v1,v2){ this.mProgessBar.node.active = true if(this.mLabel){ this.mLabel.string = v1+'/'+v2 } this.mProgessBar.progress = v1/v2 } public setLock(){ this.mProgessBar.node.active = false } }