继续补充横屏逻辑

This commit is contained in:
2025-05-26 21:17:05 +08:00
parent 12b16320e6
commit 4e0e536c49
5 changed files with 45 additions and 26 deletions

View File

@@ -67,10 +67,15 @@ export class GameDone extends Laya.Script {
this.btn_home.on(Laya.Event.CLICK, this, (evt: Laya.Event) => {
if (config.H_SCREEN) {
UIManager.getInstance().closeDCUI()
var user = StorageManager.getInstance().getUser()
user.update_progress(doStage.get_difficulty(), doStage.get_stageIndex()+1)//主线关卡更新难度进度
StorageManager.getInstance().newStage(config.DEFAULT_STAGE_ID, config.STAGE_TYPE.MAIN, doStage.get_difficulty(), doStage.get_difficulty())
UIManager.getInstance().loadStageUI(config.DEFAULT_STAGE_ID);
if (doStage.get_stageType() == config.STAGE_TYPE.MAIN) {
var user = StorageManager.getInstance().getUser()
user.update_progress(doStage.get_difficulty(), doStage.get_stageIndex()+1)//主线关卡更新难度进度
StorageManager.getInstance().newStage(config.DEFAULT_STAGE_ID, config.STAGE_TYPE.MAIN, doStage.get_difficulty(), doStage.get_difficulty())
UIManager.getInstance().loadStageUI(config.DEFAULT_STAGE_ID);
}
else if (doStage.get_stageType() == config.STAGE_TYPE.DC) {
UIManager.getInstance().setTopbarTo(true)
}
}
else {
UIManager.getInstance().loadHomeUI()