Commit f5b60d11 authored by huoshizhe's avatar huoshizhe

feat: petRoom

parent e8a701b6
......@@ -1194,7 +1194,7 @@
"__id__": 29
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 250
......
......@@ -81,8 +81,8 @@ cc.Class({
// /api/syllabus/v1/tree?orgid=483&pid=18567
this.baseUrl = 'http://staging-teach.ireadabc.com';
this.initStoryBoxView({ coursewareId: 18307 });
// this.baseUrl = 'http://staging-teach.ireadabc.com';
// this.initStoryBoxView({ coursewareId: 18307 });
},
asyncDelayLog(str) {
......@@ -111,7 +111,8 @@ cc.Class({
this.syllabus_id = bundleInfo.syllabus_id;
this.role = bundleInfo.role;
this.loadBundle(bundleInfo);
this.initPetRoomView(bundleInfo);
} else if (bundleType == "StoryBox") {
const descLabel = cc.find('middleLayer/storyBox/menu/menuBase/title/name');
descLabel.getComponent(cc.Label).string = bundleInfo.coursewareDescription;
......@@ -128,6 +129,11 @@ cc.Class({
}
},
initPetRoomView(bundleInfo) {
this.hideWWView();
this.loadBundle(bundleInfo);
},
initStoryBoxView(bundleInfo) {
this.hideWWView();
......@@ -549,9 +555,19 @@ cc.Class({
if (err) {
this.asyncDelayLog('err: ', err);
}
this.hideWaitingLetters();
callback && callback();
cc.director.runScene(scene);
cc.audioEngine.stopAll();
cc.director.runScene(scene, null, () => {
console.log('sceneName = ' + conf.sceneName);
const Canvas = cc.find('Canvas');
const middleLayer = cc.find('middleLayer');
this.hideWaitingLetters();
callback && callback();
Canvas.getComponent(cc.Widget).updateAlignment();
// middleLayer.scale = Canvas.width / middleLayer.width;
const frameSize = cc.view.getFrameSize();
console.log(`Canvas.size = ${Canvas.width}, ${Canvas.height}`);
console.log(`frameSize.size = ${frameSize.width}, ${frameSize.height}`);
});
});
});
},
......
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