This commit is contained in:
szrpf
2023-10-01 22:15:40 +08:00
parent 4b9cac1744
commit 3f3ee943a4
3 changed files with 49 additions and 109 deletions

View File

@@ -16,13 +16,8 @@ export default class SceneAdapter extends cc.Component {
this.destroy();
return;
}
if (cvs.designResolution.width < cvs.designResolution.height) {
cvs.fitWidth = true;
cvs.fitHeight = false;
} else {
cvs.fitWidth = false;
cvs.fitHeight = true;
}
cvs.fitWidth = true;
cvs.fitHeight = true;
this.resize();
cc.view.setResizeCallback(this.resize.bind(this));
}