Commit ad9a1485 authored by 范雪寒's avatar 范雪寒

feat: 转屏

parent 05c0804d
...@@ -118,6 +118,7 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -118,6 +118,7 @@ export abstract class middleLayerBase extends cc.Component {
} }
cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => { cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => {
console.log('bundle: ', bundle);
bundle.loadScene(sceneName, null, null, (err, scene) => { bundle.loadScene(sceneName, null, null, (err, scene) => {
const btnRestart = cc.find('middleLayer/BtnRestart'); const btnRestart = cc.find('middleLayer/BtnRestart');
btnRestart.active = false; btnRestart.active = false;
...@@ -138,7 +139,7 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -138,7 +139,7 @@ export abstract class middleLayerBase extends cc.Component {
} }
checkRotateScreen(oldSceneName: string, newSceneName: string) { checkRotateScreen(oldSceneName: string, newSceneName: string) {
const sceneNameList = ['op_16']; const sceneNameList = [];
if (sceneNameList.includes(oldSceneName) || sceneNameList.includes(newSceneName)) { if (sceneNameList.includes(oldSceneName) || sceneNameList.includes(newSceneName)) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (sceneNameList.includes(newSceneName)) { if (sceneNameList.includes(newSceneName)) {
......
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