格式化代码 var to let or const

This commit is contained in:
2025-05-28 20:29:24 +08:00
parent 8da20ab53e
commit 19d4c52c5e
15 changed files with 88 additions and 87 deletions

View File

@@ -39,7 +39,7 @@ export class GameDone extends Laya.Script {
this.label_time.text = Utility_ConvertSecondToString(doStage.get_duration())
this.label_score.text = doStage.get_score().toString()
this.btn_new.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
this.btn_new.on(Laya.Event.CLICK, this, () => {
if (config.H_SCREEN) {
const user = StorageManager.getInstance().getUser()
user.update_progress(doStage.get_difficulty(), doStage.get_stageIndex() + 1)// 主线关卡更新难度进度
@@ -60,13 +60,13 @@ export class GameDone extends Laya.Script {
}
})
this.btn_continue.on(Laya.Event.CLICK, this, (evt: Laya.Event) => { // 这个按钮只有从DC来的会显示
this.btn_continue.on(Laya.Event.CLICK, this, () => { // 这个按钮只有从DC来的会显示
UIManager.getInstance().loadDCUI()
UIManager.getInstance().closeStageUI()
this.owner.destroy()
})
this.btn_home.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
this.btn_home.on(Laya.Event.CLICK, this, () => {
if (config.H_SCREEN) {
UIManager.getInstance().closeDCUI()
if (doStage.get_stageType() === config.STAGE_TYPE.MAIN) {