Merge branch 'main' of https://git.sparkus.cn/yangzhao/cb
This commit is contained in:
commit
870d9ac98d
|
@ -153,6 +153,7 @@ export default class NewClass extends cc.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
init() {
|
init() {
|
||||||
|
let isExpired = cc.fx.GameTool.checkExpiration();
|
||||||
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
|
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
|
||||||
// 定义监听函数
|
// 定义监听函数
|
||||||
this.onShowListener = () => {
|
this.onShowListener = () => {
|
||||||
|
@ -163,7 +164,7 @@ export default class NewClass extends cc.Component {
|
||||||
wx.onShow(this.onShowListener);
|
wx.onShow(this.onShowListener);
|
||||||
}
|
}
|
||||||
this.btn_Touch = true;
|
this.btn_Touch = true;
|
||||||
if (cc.fx.GameConfig.GM_INFO.hp_Max == 7) {
|
if (isExpired) {
|
||||||
this.monthCardBtn.active = false;
|
this.monthCardBtn.active = false;
|
||||||
this.monthCardBtn2.active = true;
|
this.monthCardBtn2.active = true;
|
||||||
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.monthTime, 35, 20, "month_", this.monthCardTime, true);
|
NumberToImage.numberToImageNodes(cc.fx.GameConfig.GM_INFO.monthTime, 35, 20, "month_", this.monthCardTime, true);
|
||||||
|
|
|
@ -746,7 +746,8 @@ export default class NewClass extends cc.Component {
|
||||||
}
|
}
|
||||||
//更新图标
|
//更新图标
|
||||||
updateIcon() {
|
updateIcon() {
|
||||||
if (cc.fx.GameConfig.GM_INFO.hp_Max == 7) {
|
let isExpired = cc.fx.GameTool.checkExpiration();
|
||||||
|
if (isExpired) {
|
||||||
this.monthCardTime.active = true;
|
this.monthCardTime.active = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user