|
@@ -9,7 +9,7 @@ import GameFinish, { PropsFinish } from "../res/luojigouFinish/src/LuojigouFinis
|
|
|
import AudioCB from "../src/audioUitls/AudioCB";
|
|
|
import Tools from "../src/common/Tools";
|
|
|
import PopupManager, { PopupCacheMode } from "../src/popUp/PopupManager";
|
|
|
-import { HttpStateMap } from "../res/http/HttpStateMap";
|
|
|
+import AudioManager from "../src/audioUitls/AudioManager";
|
|
|
|
|
|
const { ccclass, property } = cc._decorator;
|
|
|
@ccclass
|
|
@@ -65,15 +65,16 @@ export default class Scene extends cc.Component {
|
|
|
this.enterGame();
|
|
|
}
|
|
|
else {
|
|
|
- const options = {
|
|
|
- title: '',
|
|
|
- content: '请下载应用!'
|
|
|
- };
|
|
|
- const params = {
|
|
|
- mode: PopupCacheMode.Once,
|
|
|
- };
|
|
|
- let prefab = await PopupManager.load('prefab/popUp');
|
|
|
- PopupManager.show(cc.instantiate(prefab), options, params);
|
|
|
+ // const options = {
|
|
|
+ // title: '',
|
|
|
+ // content: '请下载应用!'
|
|
|
+ // };
|
|
|
+ // const params = {
|
|
|
+ // mode: PopupCacheMode.Once,
|
|
|
+ // };
|
|
|
+ // let prefab = await PopupManager.load('prefab/popUp');
|
|
|
+ // PopupManager.show(cc.instantiate(prefab), options, params);
|
|
|
+ window.location.href = common.urlClass;
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
@@ -109,7 +110,8 @@ export default class Scene extends cc.Component {
|
|
|
common.setItemId(json.itemId);
|
|
|
let isHas = await this.initData(unitNum);
|
|
|
if (isHas) {
|
|
|
- await AudioCB.instance.init();
|
|
|
+ await AudioCB.getInstance().init();
|
|
|
+ await AudioManager.getInstance().loadAudios();
|
|
|
this.initUI();
|
|
|
|
|
|
common.log("场景加载完成,等待进入游戏层");
|
|
@@ -121,15 +123,16 @@ export default class Scene extends cc.Component {
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- const options = {
|
|
|
- title: '',
|
|
|
- content: '当前动画游戏不存在!',
|
|
|
- };
|
|
|
- const params = {
|
|
|
- mode: PopupCacheMode.Once,
|
|
|
- };
|
|
|
- let prefab = await PopupManager.load('prefab/popUp');
|
|
|
- PopupManager.show(cc.instantiate(prefab), options, params);
|
|
|
+ // const options = {
|
|
|
+ // title: '',
|
|
|
+ // content: '当前动画游戏不存在!',
|
|
|
+ // };
|
|
|
+ // const params = {
|
|
|
+ // mode: PopupCacheMode.Once,
|
|
|
+ // };
|
|
|
+ // let prefab = await PopupManager.load('prefab/popUp');
|
|
|
+ // PopupManager.show(cc.instantiate(prefab), options, params);
|
|
|
+ window.location.href = common.urlClass;
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -211,6 +214,7 @@ export default class Scene extends cc.Component {
|
|
|
script.initBundle(bundle, config);
|
|
|
}
|
|
|
this.node.addChild(this.nodeShow, CConst.ZORDER_GAME);
|
|
|
+ this.node.getChildByName('bg').active = true;
|
|
|
this.resetBtnNext(true);
|
|
|
}
|
|
|
|
|
@@ -223,6 +227,7 @@ export default class Scene extends cc.Component {
|
|
|
script.initBundle(bundle, config);
|
|
|
}
|
|
|
this.nodeVideo.active = true;
|
|
|
+ this.node.getChildByName('bg').active = false;
|
|
|
this.resetBtnNext(true);
|
|
|
}
|
|
|
|