测试模式非本月10号通关之后即可获得奖杯
This commit is contained in:
@@ -488,6 +488,8 @@ export class Stage extends Laya.Script {
|
||||
console.log("dc完成信息>>>>>>>>>>>>>>>", nowYear, nowMonth, doneCount, dayCount)
|
||||
if (doneCount >= dayCount) { // 当月每日挑战全部完成
|
||||
user.add_trophy_record(nowYear, nowMonth, day)
|
||||
} else {
|
||||
this.rewardTrophyInDebug()
|
||||
}
|
||||
}
|
||||
UIManager.getInstance().loadGameDoneUI(false, this.data)
|
||||
@@ -589,4 +591,24 @@ export class Stage extends Laya.Script {
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
rewardTrophyInDebug(): void {
|
||||
console.log("测试模式非本月10号通关之后即可获得奖杯", config.DEBUG)
|
||||
if (config.DEBUG) {
|
||||
const stageID = this.data.get_stageID()
|
||||
const list = stageID.split("-")
|
||||
const year = Number(list[0])
|
||||
const month = Number(list[1])
|
||||
const day = Number(list[2])
|
||||
if (day === 10) {
|
||||
const now = new Date()
|
||||
const nowYear = now.getFullYear()
|
||||
const nowMonth = now.getMonth() + 1
|
||||
if (year !== nowYear || month !== nowMonth) {
|
||||
const user = StorageManager.getInstance().getUser()
|
||||
user.add_trophy_record(year, month, day)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user