更新代码格式

This commit is contained in:
2025-06-03 20:36:13 +08:00
parent 22dcb86c69
commit b18fefa905
7 changed files with 6 additions and 11 deletions

View File

@@ -14,7 +14,7 @@ export class Main extends Laya.Script {
StorageManager.getInstance().init()
const resources: Array<{ url: string, type?: any, lazy?: boolean }> = [
{ url: respath.score_add_ui_res()},
{ url: respath.score_add_ui_res() },
{ url: respath.dc_top_bg_normal, type: Laya.Loader.IMAGE },
{ url: respath.dc_top_bg_month_finish, type: Laya.Loader.IMAGE },

View File

@@ -121,9 +121,9 @@ export class UIManager extends Laya.Script {
public loadDCWtihMonth(year: number, month: number): void {
this.closeTrophyUI()
if (this.dc_ui) {
this.dc_ui.loadWithMonth(year, month)
}
if (this.dc_ui) {
this.dc_ui.loadWithMonth(year, month)
}
}
public closeDCUI(): void {

View File

@@ -64,7 +64,6 @@ export class GameDone extends Laya.Script {
}
onStart(): void {
// Laya.Tween.to(this.owner, { y: 0 }, 300, Laya.Ease.elasticOut)
Laya.Tween.to(this.obj_panel, { alpha: 1 }, 400, Laya.Ease.elasticOut, null, 100)

View File

@@ -173,7 +173,7 @@ export class Stage extends Laya.Script {
this.paused = false
this.obj_mask.visible = false
if (config.H_SCREEN) {
this.btn_back.visible = this.data.get_stageType() === config.STAGE_TYPE.DC
this.btn_new.visible = this.data.get_stageType() === config.STAGE_TYPE.MAIN

View File

@@ -164,5 +164,4 @@ export class TopBar extends Laya.Script {
sprite.graphics.clear()
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb")
}
}

View File

@@ -135,7 +135,6 @@ export class DailyChallenge extends Laya.Script {
}
}
this.btn_left.on(Laya.Event.CLICK, this, this.onClickLeft)
this.btn_right.on(Laya.Event.CLICK, this, this.onClickRight)
this.btn_left2.on(Laya.Event.CLICK, this, this.onClickLeft)
@@ -276,7 +275,6 @@ export class DailyChallenge extends Laya.Script {
this.onApplyUnit(unit)
}
onClickLeft(): void {
if (this.currentIndex > 0) {
this.currentIndex--

View File

@@ -41,8 +41,7 @@ export class TrophyUnit extends Laya.Script {
const find = user.get_trophyRecord(info.year, info.month)
if (find) {
UIManager.getInstance().loadTrophyShowUI(find)
}
else {
} else {
UIManager.getInstance().loadDCWtihMonth(info.year, info.month)
}
})