Commit e6b0b2a0 authored by limingzhe's avatar limingzhe

fix: 转屏测试

parent 658b841a
......@@ -136,7 +136,7 @@ export abstract class middleLayerBase extends cc.Component {
const oldSceneName = this.currentBundleInfo?.sceneName;
const engineInfo = await this.getEngineInfo();
const { isChanged } = JSON.parse(engineInfo);
if (isChanged) {
if (isChanged || true) {
await this.checkRotateScreen(oldSceneName, sceneName);
}
......@@ -163,7 +163,13 @@ export abstract class middleLayerBase extends cc.Component {
const sceneNameList = ["cc_mz_link_write_03"];
if (sceneNameList.includes(oldSceneName) || sceneNameList.includes(newSceneName)) {
return new Promise((resolve, reject) => {
console.log(' in RotateScreen 1 ...')
if (sceneNameList.includes(newSceneName)) {
console.log(' in RotateScreen 2 ...')
// 如果已经是竖屏了
if (cc.view.getCanvasSize().width < cc.view.getCanvasSize().height) {
resolve(null);
......@@ -177,6 +183,9 @@ export abstract class middleLayerBase extends cc.Component {
resolve(null);
});
} else {
console.log(' in RotateScreen 3 ...')
// 如果已经是横屏了
if (cc.view.getCanvasSize().width > cc.view.getCanvasSize().height) {
resolve(null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment