测试模式非本月10号通关之后即可获得奖杯
This commit is contained in:
@@ -52,7 +52,7 @@ export class Home extends Laya.Script {
|
|||||||
const find = G_getMonthInfo(nowYear, nowMonth)
|
const find = G_getMonthInfo(nowYear, nowMonth)
|
||||||
if (find) {
|
if (find) {
|
||||||
this.icon_dc.skin = find.icon_res
|
this.icon_dc.skin = find.icon_res
|
||||||
if (user.get_doneCountByDate(nowYear, nowMonth) >= find.dayCount) {
|
if (user.get_trophyRecord(nowYear, nowMonth)) {
|
||||||
this.bg_dc.skin = respath.home_top_dc_bg_finish
|
this.bg_dc.skin = respath.home_top_dc_bg_finish
|
||||||
this.label_dc_title.color = "#ffffff"
|
this.label_dc_title.color = "#ffffff"
|
||||||
this.label_dc_date.color = "#ffffff"
|
this.label_dc_date.color = "#ffffff"
|
||||||
|
|||||||
@@ -488,6 +488,8 @@ export class Stage extends Laya.Script {
|
|||||||
console.log("dc完成信息>>>>>>>>>>>>>>>", nowYear, nowMonth, doneCount, dayCount)
|
console.log("dc完成信息>>>>>>>>>>>>>>>", nowYear, nowMonth, doneCount, dayCount)
|
||||||
if (doneCount >= dayCount) { // 当月每日挑战全部完成
|
if (doneCount >= dayCount) { // 当月每日挑战全部完成
|
||||||
user.add_trophy_record(nowYear, nowMonth, day)
|
user.add_trophy_record(nowYear, nowMonth, day)
|
||||||
|
} else {
|
||||||
|
this.rewardTrophyInDebug()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UIManager.getInstance().loadGameDoneUI(false, this.data)
|
UIManager.getInstance().loadGameDoneUI(false, this.data)
|
||||||
@@ -589,4 +591,24 @@ export class Stage extends Laya.Script {
|
|||||||
}
|
}
|
||||||
return b
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,8 +191,7 @@ export class DailyChallenge extends Laya.Script {
|
|||||||
|
|
||||||
this.trophy_icon.skin = info.icon_res
|
this.trophy_icon.skin = info.icon_res
|
||||||
// 设置背景
|
// 设置背景
|
||||||
const starCount = user.get_doneCountByDate(info.year, info.month)
|
if (user.get_trophyRecord(info.year, info.month)) {
|
||||||
if (starCount >= info.dayCount) {
|
|
||||||
this.bg_dc.skin = respath.dc_top_bg_month_finish
|
this.bg_dc.skin = respath.dc_top_bg_month_finish
|
||||||
this.trophy_light.visible = true
|
this.trophy_light.visible = true
|
||||||
this.trophy_icon.gray = false
|
this.trophy_icon.gray = false
|
||||||
@@ -201,6 +200,7 @@ export class DailyChallenge extends Laya.Script {
|
|||||||
this.trophy_light.visible = false
|
this.trophy_light.visible = false
|
||||||
this.trophy_icon.gray = true
|
this.trophy_icon.gray = true
|
||||||
}
|
}
|
||||||
|
const starCount = user.get_doneCountByDate(info.year, info.month)
|
||||||
this.label_year.text = info.year.toString()
|
this.label_year.text = info.year.toString()
|
||||||
this.label_month.text = config.MONTH_FULLNAMES[info.month - 1]
|
this.label_month.text = config.MONTH_FULLNAMES[info.month - 1]
|
||||||
this.label_star.text = `${starCount}/${info.dayCount}`
|
this.label_star.text = `${starCount}/${info.dayCount}`
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export class TrophyUnit extends Laya.Script {
|
|||||||
this.icon.skin = info.icon_res
|
this.icon.skin = info.icon_res
|
||||||
this.label_count.text = `${starCount}/${info.dayCount}`
|
this.label_count.text = `${starCount}/${info.dayCount}`
|
||||||
this.label_month.text = config.MONTH_ABBRS[info.month - 1]
|
this.label_month.text = config.MONTH_ABBRS[info.month - 1]
|
||||||
if (starCount >= info.dayCount) {
|
if (user.get_trophyRecord(info.year, info.month)) {
|
||||||
this.bg_light.skin = respath.trophy_bg_light_gold
|
this.bg_light.skin = respath.trophy_bg_light_gold
|
||||||
this.icon.gray = false
|
this.icon.gray = false
|
||||||
this.label_month.color = "#2d3138"
|
this.label_month.color = "#2d3138"
|
||||||
|
|||||||
Reference in New Issue
Block a user