更新代码格式
This commit is contained in:
@@ -14,7 +14,7 @@ export class Main extends Laya.Script {
|
|||||||
StorageManager.getInstance().init()
|
StorageManager.getInstance().init()
|
||||||
|
|
||||||
const resources: Array<{ url: string, type?: any, lazy?: boolean }> = [
|
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_normal, type: Laya.Loader.IMAGE },
|
||||||
{ url: respath.dc_top_bg_month_finish, type: Laya.Loader.IMAGE },
|
{ url: respath.dc_top_bg_month_finish, type: Laya.Loader.IMAGE },
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ export class UIManager extends Laya.Script {
|
|||||||
|
|
||||||
public loadDCWtihMonth(year: number, month: number): void {
|
public loadDCWtihMonth(year: number, month: number): void {
|
||||||
this.closeTrophyUI()
|
this.closeTrophyUI()
|
||||||
if (this.dc_ui) {
|
if (this.dc_ui) {
|
||||||
this.dc_ui.loadWithMonth(year, month)
|
this.dc_ui.loadWithMonth(year, month)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeDCUI(): void {
|
public closeDCUI(): void {
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ export class GameDone extends Laya.Script {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onStart(): void {
|
onStart(): void {
|
||||||
|
|
||||||
// Laya.Tween.to(this.owner, { y: 0 }, 300, Laya.Ease.elasticOut)
|
// 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)
|
Laya.Tween.to(this.obj_panel, { alpha: 1 }, 400, Laya.Ease.elasticOut, null, 100)
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ export class Stage extends Laya.Script {
|
|||||||
this.paused = false
|
this.paused = false
|
||||||
|
|
||||||
this.obj_mask.visible = false
|
this.obj_mask.visible = false
|
||||||
|
|
||||||
if (config.H_SCREEN) {
|
if (config.H_SCREEN) {
|
||||||
this.btn_back.visible = this.data.get_stageType() === config.STAGE_TYPE.DC
|
this.btn_back.visible = this.data.get_stageType() === config.STAGE_TYPE.DC
|
||||||
this.btn_new.visible = this.data.get_stageType() === config.STAGE_TYPE.MAIN
|
this.btn_new.visible = this.data.get_stageType() === config.STAGE_TYPE.MAIN
|
||||||
|
|||||||
@@ -164,5 +164,4 @@ export class TopBar extends Laya.Script {
|
|||||||
sprite.graphics.clear()
|
sprite.graphics.clear()
|
||||||
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb")
|
sprite.graphics.drawRoundRect(0, 0, sprite.width, sprite.height, 12, 12, 12, 12, "#f5f7fb")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ export class DailyChallenge extends Laya.Script {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.btn_left.on(Laya.Event.CLICK, this, this.onClickLeft)
|
this.btn_left.on(Laya.Event.CLICK, this, this.onClickLeft)
|
||||||
this.btn_right.on(Laya.Event.CLICK, this, this.onClickRight)
|
this.btn_right.on(Laya.Event.CLICK, this, this.onClickRight)
|
||||||
this.btn_left2.on(Laya.Event.CLICK, this, this.onClickLeft)
|
this.btn_left2.on(Laya.Event.CLICK, this, this.onClickLeft)
|
||||||
@@ -276,7 +275,6 @@ export class DailyChallenge extends Laya.Script {
|
|||||||
this.onApplyUnit(unit)
|
this.onApplyUnit(unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onClickLeft(): void {
|
onClickLeft(): void {
|
||||||
if (this.currentIndex > 0) {
|
if (this.currentIndex > 0) {
|
||||||
this.currentIndex--
|
this.currentIndex--
|
||||||
|
|||||||
@@ -41,8 +41,7 @@ export class TrophyUnit extends Laya.Script {
|
|||||||
const find = user.get_trophyRecord(info.year, info.month)
|
const find = user.get_trophyRecord(info.year, info.month)
|
||||||
if (find) {
|
if (find) {
|
||||||
UIManager.getInstance().loadTrophyShowUI(find)
|
UIManager.getInstance().loadTrophyShowUI(find)
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
UIManager.getInstance().loadDCWtihMonth(info.year, info.month)
|
UIManager.getInstance().loadDCWtihMonth(info.year, info.month)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user