2021-02-01 16:11:00 +00:00
|
|
|
const {ccclass, property} = cc._decorator;
|
|
|
|
|
2021-02-03 13:34:58 +00:00
|
|
|
//@ts-ignore
|
|
|
|
import UpdateManager = require('UpdateManager');
|
|
|
|
|
2021-02-01 16:11:00 +00:00
|
|
|
@ccclass
|
|
|
|
export default class NewClass extends cc.Component {
|
|
|
|
|
|
|
|
@property(cc.Label)
|
|
|
|
label: cc.Label = null;
|
|
|
|
|
2021-02-03 13:34:58 +00:00
|
|
|
start() {
|
|
|
|
if (UpdateManager.getUpdateFlag()) {
|
|
|
|
this.label.string = UpdateManager.cur_ver_desc;
|
|
|
|
UpdateManager.resetUpdateFlag();
|
|
|
|
} else {
|
|
|
|
this.label.string = "未发现新版本,\n当前版本:" + UpdateManager.cur_ver_name;
|
|
|
|
}
|
|
|
|
console.log('>>>>>>>>>>>>>>>>>>>>>', UpdateManager.cur_ver_code);
|
2021-02-01 16:11:00 +00:00
|
|
|
}
|
|
|
|
}
|