格式化代码 var to let or const
This commit is contained in:
@@ -25,13 +25,13 @@ export class GameOver extends Laya.Script {
|
||||
public label_newOrClose: Laya.Label
|
||||
|
||||
public onSetStageInfo(doStage: DOStage): void {
|
||||
this.btn_second.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
|
||||
this.btn_second.on(Laya.Event.CLICK, this, () => {
|
||||
doStage.set_mistake(doStage.get_mistake() - 1)
|
||||
EventManager.getInstance().DispatchEvent(EVENT_TYPES.NOT_UPDATE_MISTAKE)
|
||||
this.owner.destroy()
|
||||
})
|
||||
|
||||
this.btn_restart.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
|
||||
this.btn_restart.on(Laya.Event.CLICK, this, () => {
|
||||
const stageID = doStage.get_stageID()
|
||||
const type = doStage.get_stageType()
|
||||
const difficulty = doStage.get_difficulty()
|
||||
@@ -43,7 +43,7 @@ export class GameOver extends Laya.Script {
|
||||
const type = doStage.get_stageType()
|
||||
if (type === config.STAGE_TYPE.MAIN) {
|
||||
this.label_newOrClose.text = "New Game"
|
||||
this.btn_newOrClose.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
|
||||
this.btn_newOrClose.on(Laya.Event.CLICK, this, () => {
|
||||
if (config.H_SCREEN) {
|
||||
const user = StorageManager.getInstance().getUser()
|
||||
user.update_progress(doStage.get_difficulty(), doStage.get_stageIndex() + 1)// 主线关卡更新难度进度
|
||||
@@ -66,7 +66,7 @@ export class GameOver extends Laya.Script {
|
||||
})
|
||||
} else {
|
||||
this.label_newOrClose.text = "Close"
|
||||
this.btn_newOrClose.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
|
||||
this.btn_newOrClose.on(Laya.Event.CLICK, this, () => {
|
||||
UIManager.getInstance().loadDCUI()
|
||||
UIManager.getInstance().closeStageUI()
|
||||
this.owner.destroy()
|
||||
|
||||
Reference in New Issue
Block a user